Boost logo

Boost Users :

From: Wilkinson, John (john.wilkinson_at_[hidden])
Date: 2005-05-26 01:43:20


> > const string float_regex =
> > "([+-]?(([\\d]+\\.?)|(\\.[\\d]+)|([\\d]+\\.[\\d]+))){0,1}";
>
> All of your groups are "capturing", which would explain all of the
> extra matches you get. You should make all but the outermost group in
> float_regex non-capturing using "(?:" instead of "(".

Thanks that explains it. I was searching for such a switch but assumed it
would be in regex_match.

John W.


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