Struggling with Regex search - want to capture multiple search results from a single search

I want to capture all the occurrences of things that should be links in a string (e.g. http:, ftp:, https: …)

Regex makes the search very easy, but I can not figure out how to get more than one match per search - is this possible?

My starting point is this…

If my text is: “ftp://link1 http://link2 https://link3” I can only figure out how to get the first item “ftp://link1” from the search as follows:

Is it possible to get multiple search results from a single search command?

You need to loop through the resulting RegexMatch. For instance:

dim theProperties(-1) as String dim theStart as Integer while theRegexMatch <> nil theStart = theRegexMatch.subExpressionStartB(0) + len(theRegexMatch.subExpressionString(0)) theProperties.Append theRegexMatch.SubExpressionString(0) theRegex.SearchStartPosition = theStart theRegexMatch = Wend

Thank you.