Boost logo

Boost Users :

From: Robert Mathews (rmathews_at_[hidden])
Date: 2005-06-28 16:37:08


I was trying to write "Match everything *except* Bar".

I wrote this:

bool aResult = boost::regex_match(L"Foo", boost::wregex(L"[^(Bar)]"));

This doesn't match. But if I wrote the same thing in Perl, it does work, ie:

print "match\n" if( "Foo" =~ "[^(Bar)]");

It looks a lot like sets can't contain subexpressions in boost::regex ... is
that really true?
Is there some other way to write the same thing?


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at