Just change the expression to non-greedy and reverse the match order:
Dim reg As New Regex("\s\(.+?\)</P>", RegexOptions.IgnoreCase Or RegexOptions.RightToLeft)
Or make it match only one closing parenthesis:
"\s\([^)]+\)</P>"
Or make it match only numbers inside your pharentesis:
"\s\(\d+\)</P>"
Edit: in order to make the non-greedy sample to work, you'll need to set the RightToLeft flag on the Regex
object
Fábio Batista
2010-04-08 21:32:37