|
Boost : |
From: Benzinger, Ralph (ralph.benzinger_at_[hidden])
Date: 2004-05-12 04:46:13
Hello,
Regular expressions "[\u]" and "\u", unlike "[[:upper:]]", will not match any letters when the icase flag is set. Similarly, "\U" will match anything. Expressions "\l" and "\L" seem to be fine due to the lower_case_map[] translation.
My suggestion would be to replace
classes.push(traits_type::char_class_upper);
and the like by
classes.push((_flags & regex_constants::icase) ?
traits_type::char_class_alpha :
traits_type::char_class_upper);
in the 'syntax_u/U/l/L' cases in set_compile() and set_expression(). This approach is currently taken in the 'syntax_open_set' case in set_compile().
John may have a different fix in mind, though. :-)
Regards,
Ralph
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk