Boost logo

Boost Users :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2005-05-25 10:28:08


On 5/25/05, Wilkinson, John <john.wilkinson_at_[hidden]> wrote:

> 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 "(".

-- 
Caleb Epstein
caleb dot epstein at gmail dot com

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