Re: [Boost-bugs] [Boost C++ Libraries] #4721: multiple capture groups with the same name break regex

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4721: multiple capture groups with the same name break regex
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-10-12 21:09:04


#4721: multiple capture groups with the same name break regex
-------------------------------------+--------------------------------------
  Reporter: robin.snyder@… | Owner: johnmaddock
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: regex
   Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords: regex named capture group
-------------------------------------+--------------------------------------

Comment (by anonymous):

 to make the above pattern work it needs to be edited by adding numbers
 after the easting and northing names

 {{{
 (?<MPAT01>((?<MPAT01.zone>[0-5][0-9]|60)\s*)((?<MPAT01.band>[CcDdEeFfGgHhJjKkLlMmNnPpQqRrSsTtUuVvWwXx])\s*)(?<MPAT01.grid>[AaBbCcDdEeFfGgHhJjKkLlMmNnPpQqRrSsTtUuVvWwXxYyZz][AaBbCcDdEeFfGgHhJjKkLlMmNnPpQqRrSsTtUuVv])\s*(((?<MPAT01.easting5>\d{5})\s*(?<MPAT01.northing5>\d{5}))|((?<MPAT01.easting4>\d{4})\s*(?<MPAT01.northing4>\d{4}))|((?<MPAT01.easting3>\d{3})\s*(?<MPAT01.northing3>\d{3}))))([^\d]|$)
 }}}
 once this is done all 3 patterns will match properly. however getting at
 the named groups is now more difficult.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4721#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC