|
Boost Users : |
Subject: [Boost-users] Simple regex does not match
From: Jean-Pierre Bergamin (james_at_[hidden])
Date: 2008-10-02 09:32:13
Hello everyone
Why does the following regex not match?
boost::regex expected("foo");
BOOST_CHECK(boost::regex_match("foo bar", expected));
Is there a flag I should set so that this regex matches? In perl, there
would be a match in this case.
if ("foo bar" =~ /foo/) { ... }
Thanks for your hints.
James
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net