regex: named group capturing?
807589Nov 13 2006 — edited Jun 27 2008Hi, I know that in JAVA regular expression "capturing groups are numbered by counting their opening parentheses from left to right", but is there anyway to assign a name to a capturing group, like the way in python:
(?P<year>[0-9][0-9][0-9][0-9]) //see regular expression Howto website
where this group is named "year" and and be retrieved by the group name.
Can I do this in JAVA regex? Any hints please, thanks!