Reputation: 4297
I am trying to implement a paper. The author has a pattern:
u*v+w+
And he said if 'u*' is not empty,"blablabla" else empty another choice. But how could I know if 'u*' is matched or not in the whole part?
Upvotes: 1
Views: 41
Reputation: 785561
Use captured groups e.g. (u*)v+w+
as regex and then check matcher.group(1)
to determine whether u*
matched or not.
Upvotes: 1