$ 1 means the first left bracket on the left
$ 2 means that the left is the second left
href = "http://www.lamking.com"
RE = "((http | ftp): //) (. *)" // set mode
Var regex = new regexp (re, "gi"); // Establish regular expressions globally unwritten
Var arr = regex.exec (href); // Execute a search
JS1 = "JS_ $ 1 =" Regexp. $ 1 // http: //
JS2 = "JS_ $ 2 =" Regexp. $ 2 // http
JS3 = "JS_ $ 3 =" Regexp. $ 3 //www.lamking.com
// Alert ("starts to get match characters position =" regexp.index)
// Alert ("Last matching to match characters position =" regexp.lastindex)
// Alert ("Last matching parentheses =" regexp.lastparen)
script>
SET Regex = New Regexp
Regex.pattern = "((http | ftp): //) (. *)"
Regex.ignorecase = TRUE
Regex.global = TRUE
Set matches = regex.execute (HREF)
Set omatch = matches (0)
i = 0
'Capture a string of strings in a string collection
'for each oomatch in omatch.submatches
'Alert ("$" & I & "=" & oomatch)
'i = i 1
'Next
VBS1 = "VBS_ $ 1 =" Regex.Replace (HREF, "$ 1")
VBS2 = "VBS_ $ 2 =" Regex.Replace (HREF, "$ 2")
VBS3 = "VBS_ $ 3 =" Regex.Replace (HREF, "$ 3")
Alert (JS1 & VBNewline & VBS1)
Alert (JS2 & VBNewline & VBS2)
Alert (JS3 & VBNewline & VBS3)
script>
You can modify the run