
26 May
2005
26 May
'05
6:43 a.m.
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.