Boost logo

Boost Users :

From: John Maddock (john_maddock_at_[hidden])
Date: 2001-12-13 07:05:38


>I'm trying to match strings of the form "a&b&c&d" with the following
>expression: "(?:([^&]+)&)*([^&]+)". This nicely matches the whole
>string but instead of giving me the submatches "a", "b", "c" and "d"
>I just get "c" and "d". Could anyone tell me what I'm doing wrong?

Look more closely at your expression: it has only *two* marked
sub-expressions, $1 gets "overwritten" each time it matches.

- John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net