Reputation: 2443
i got the following regex, which is working on some regex testers out there flawlessly. (for example www.regextester.com)
I want 1 item with "500", 1 with "600" and 1 with "-100".
Dim matches As MatchCollection
Dim regex As New Regex("(\d+)\s\/\s(\d+)\s\((\-?\d+)\)")
matches = regex.Matches("500 / 600 (-100)")
My matches.count is one, with the complete string. Nothing else.
Any ideas?
Thanks in advice.
Upvotes: 2
Views: 78
Reputation: 2625
You have one match with three groups.
what result are you expecting?
Upvotes: 0
Reputation: 59016
You have 1 match, with 3 groups. Check matches(0).Groups(1)
through matches(0).Groups(3)
Upvotes: 3