RESULTS:
Execution Time(sec.):
0.000021
Raw Match Pattern:
(?<=##)([^&\\n]*?)(&.*?)?(?=##)
Classic ASP Code Example:
<%
Set regEx = New RegExp
regEx.Global = True
sourcestring = "your source string"
regEx.Pattern = "(?<=##)([^&\\n]*?)(&.*?)?(?=##)"
Set Matches = regEx.Execute(sourcestring)
For z = 0 to Matches.Count-1
results = results & "Matches(" & z & ") = " & chr(34) & Server.HTMLEncode(Matches(z)) & chr(34) & chr(13)
For zz = 0 to Matches(z).SubMatches.Count-1
results = results & "Matches(" & z & ").SubMatches(" & zz & ") = " & chr(34) & Server.HTMLEncode(Matches(z).SubMatches(zz)) & chr(34) & chr(13)
next
results=Left(results,Len(results)-1) & chr(13)
next
Response.Write "<pre>" & results
%>
$matches Array:
(
[0] => Array
(
[0] => TEST1&ID=123&bob=yahoo&email=oioiujij
[1] => </h1>
<h1>
[2] => TEST2
[3] => </h1>
<h1>
[4] => TEST3
[5] => </h1>
<h1>
[6] => TEST4&ID=123&bob=yahoo&email=oioiujij
[7] => </h1>
<h1>
[8] => TEST5
)
[1] => Array
(
[0] => TEST1
[1] => </h1>
<h1>
[2] => TEST2
[3] => </h1>
<h1>
[4] => TEST3
[5] => </h1>
<h1>
[6] => TEST4
[7] => </h1>
<h1>
[8] => TEST5
)
[2] => Array
(
[0] => &ID=123&bob=yahoo&email=oioiujij
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
[6] => &ID=123&bob=yahoo&email=oioiujij
[7] =>
[8] =>
)
)