Date: 2001-11-01 17:38:30
I'm hoping this is a quick 'You idiot, you know nothing about regular
I'm looking at stripping leading and trailing spaces off a string.
Why does the expression;
std::string file(" hello ");
boost::regex_match(file, whatis, boost::regex("^\\s*(.*?)\\s*$"));
match the leading spaces - i.e. it results in " hello", rather
than "hello" ?
The equivalent perl expression
is a standard, if inefficient way of stripping both leading and
What am I missing?
I'm using boost 1.25.0 on vc6sp4
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk