ASP GetArray Extract link address, $array$ separated code _ Application Tips
Source: Internet
Author: User
'==================================================
' Function name: GetArray
' Function: Extract link address, separated by $array$
' Parameter: Constr------Extract the original character of the address
' Parameter: startstr------start string
' Parameter: overstr------End String
' Parameter: Inclul------contains STARTSTR
' Parameter: Inclur------contains OVERSTR
'==================================================
Function GetArray (Byval constr,startstr,overstr,inclul,inclur)
On Error Resume Next
If constr= "$False $" or constr= "" or IsNull (constr) =true or startstr= "" or overstr= "" "or IsNull (STARTSTR) =true or IsNull (O VERSTR) =true Then
Getarray= "$False $"
Exit Function
End If
Dim Tempstr,tempstr2,objregexp,matches,match,templisturl
Tempstr= ""
Set objRegExp = New Regexp
Objregexp.ignorecase = True
Objregexp.global = True
Objregexp.pattern = "(" &StartStr& "). +? ("&OverStr&") "
Set matches =objregexp.execute (CONSTR)
For the Match in matches
If Templisturl =match.value Then
Else
Tempstr=tempstr & "$Array $" & Match.value
Templisturl=match.value
End If
Next
Set matches=nothing
If tempstr= "" Then
Getarray= "$False $"
Exit Function
End If
Tempstr=right (Tempstr,len (TEMPSTR)-7)
If Inclul=false Then
Objregexp.pattern =startstr
Tempstr=objregexp.replace (TempStr, "")
End If
If Inclur=false Then
Objregexp.pattern =overstr
Tempstr=objregexp.replace (TempStr, "")
End If
Set objregexp=nothing
Set matches=nothing
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service