RE: [Boost-users] regex_match problem

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.
7219
Age (days ago)
7219
Last active (days ago)
0 comments
1 participants
participants (1)
-
Wilkinson, John