Hi,
I've got a Regex question, I have to recognize tokens in a text that are like:
Foo-
followed by either bar
or baz
followed by -
then some numbers, like:
Foo-bar-010
Foo-baz-101
I then want to divide my matches like : Foo-bar
-010
and Foo-baz
-101
My regex is this one:
(Foo-(bar|baz))-[0-9]+
Which is kinda cool, but I don't want to define a group for the 'bar' or 'baz' clause, since it messes my results.
Any idea to get this result with only one group?