AW: Named Subgroups

Michael Rachow <[email protected]> Fri, 16 Sep 2005 11:39:04 +0200
Newsgroups gmane.comp.jakarta.oro.user
Message-ID <91B7F87B3B5ED4119D270080AD417DA23267ED@MAIL>
I'm not sure about understanding your actual problem,
but maybe creating simple constants
like static int DAY =3D 1 and using match.getGroup(DAY)
would give you some more transparency?

Regards,
Michael

-----Urspr=FCngliche Nachricht-----
Von: Hannes Koller [mailto:[email protected]]
Gesendet: Freitag, 16. September 2005 11:18
An: [email protected]
Betreff: Named Subgroups


Hi,
I have been using ORO for some time and have encountered a problem. I=20
need to give names to Subgroups (Instead of (or in addition to) the=20
numbering that is done automatically). Is there a way to do something =
like

    (?<Day>\d{2})/(?<Month>\d{2})/(?<Year>\d{4})

 which should produce  3 named subgroups  (Day, Month, Year)  and =
access=20
them in java like

       match.getGroup("Day")


Is a feature like this already implemented in ORO and I am missing it,=20
or is it planned for the near future? This would greatly ease my task. =
TIA

Hannes Koller


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]