Hi All you experts!
I used this code by Guus2005, and this page to have better understanding of the oMatches Collection.
Can any one help me get to oMatches(1)? I tested the code on a string with a few matces, it only gave me the first one.
example: the pattern (https?://|www[1-9]?\.[A-Z0-9\.-]+\.[A-Z]{2,})
on the string : "if you find a URL, such as www.access-programmers.co.uk/forums/showthread.php?t=233789 or www.gmail.com, please let me know ASAP. http://newmail.walla.co.il/ is valid too."
gave me only one msgBox with the first match (not 3).
Can anyone pleae help me on getting to the other matches? I guess it has somthing to do with tha fact it is a VBscript object running in Access. PS: the pattern is good (I checked it on all the above URLs).
I used this code by Guus2005, and this page to have better understanding of the oMatches Collection.
Can any one help me get to oMatches(1)? I tested the code on a string with a few matces, it only gave me the first one.
example: the pattern (https?://|www[1-9]?\.[A-Z0-9\.-]+\.[A-Z]{2,})
on the string : "if you find a URL, such as www.access-programmers.co.uk/forums/showthread.php?t=233789 or www.gmail.com, please let me know ASAP. http://newmail.walla.co.il/ is valid too."
Code:
For Each oMatch In oMatches
i = i + 1
MsgBox CStr(i) & ": " & Chr(13) & "Value = " & oMatch.Value & Chr(13) & _
"FirstIndex = " & oMatch.FirstIndex & Chr(13) & _
"length = " & oMatch.length
Next oMatch
Can anyone pleae help me on getting to the other matches? I guess it has somthing to do with tha fact it is a VBscript object running in Access. PS: the pattern is good (I checked it on all the above URLs).