I have searched all over and simply cannot get this one figured out. I've been trying to find all matches in a multi-line string such as:
Dim VariableText As String = "Some text <*
Dim Var1 as Integer = 5
ResponseText = IIf(Var1 <= 2,Var1 * 5, iif(Var1 > 2, Var1 * 2, 0)).ToString(""0"")
*> Some more text <* ResponseText = MsgBox(""TEST!"") *>"
Dim R as New Regex("(?<=<\*).*(?=\*>)", RegexOptions.SingleLine)
Dim Coll as MatchCollection = R.Matches(VariableText)
For Each M as Match in Coll
'Do something with each section
Please try the following.
* is greedy and it will try to match the longest string, by using
*? it will try to match the shortest.