"mainmanc" wrote:
Since we are on the subject of roRegex, I was trying to figure out an approach to emulating the preg_match_all
Assuming you just want to capture every matched value, there may be a simpler way, but this is the brute force method I used... this does modify the original string, so you may want to use a copy instead.
values = []
matches = regex.Match( response )
iLoop = 0
While matches.Count() > 1
values.Push( matches[ 1 ] )
' remove this instance, so we can get the next match
response = regex.Replace( response, "" )
matches = regex.Match( response )
' if we've looped more than 500 times, then we're
' probably stuck, so exit
iLoop = iLoop + 1
If iLoop > 500 Then
Exit While
End If
End While