I use rubular.com to create my regular expression, and their documentation describes the following:
(...) Capture everything enclosed (a|b) a or b
How can I use an OR expression without considering what's in it? Therefore, if I want to combine "a or b followed by c" and only capture c, I cannot use
(a|b)(c)
right? Then I commit both "a" and "b" as well as "c". I know that I can filter the results, but it seems like a lot of work ...
Am I missing something obvious? I use this in Java, if appropriate.
regex capture regex-group
goggin13 Jul 31 '10 at 15:42 2010-07-31 15:42
source share