S
Siam
Hi all,
Is there any way of not only checking a regular expression matches a
string, but also grabbing the the values that the wildcards matched to?
e.g, we know "Coordinate 234 124 12" matches with "Coordinate \\d++
\\d++ \\d++", but how could we actually get the values 234, 124 and 12
that matched the numbers in the pattern? I would've thought this would
by quite commonly done, but all I could find in the APIs were simple
boolean tests. I want to avoid simply scanning my way through the
string manually, cos I'm sure this was already done when doing the
matching.
Any ideas?
Cheers,
Siam
Is there any way of not only checking a regular expression matches a
string, but also grabbing the the values that the wildcards matched to?
e.g, we know "Coordinate 234 124 12" matches with "Coordinate \\d++
\\d++ \\d++", but how could we actually get the values 234, 124 and 12
that matched the numbers in the pattern? I would've thought this would
by quite commonly done, but all I could find in the APIs were simple
boolean tests. I want to avoid simply scanning my way through the
string manually, cos I'm sure this was already done when doing the
matching.
Any ideas?
Cheers,
Siam