Boost logo

Boost Users :

Subject: [Boost-users] boost::xpressive use of before(...)
From: Simon Giddings (simon.giddings_at_[hidden])
Date: 2019-04-17 09:39:49

Good morning,

In our project I have the enviable task of transforming a large number
of perl regex into boost::xpressive static code in c++.

To ensure that the code I write, I have put together a simple test app
where I create the sregex object and can then test that the result is
that which is exected.

I am stuck with the use of before(...)

Here is my test - which fails

std::string strInput = "&9-A02FEfoo";
sregex re;

re = bos >> as_xpr("&9-A02FE") >> before("foo");
if(regex_match(strInput, sm, re))
 Â Â Â  strResult = "matched : " + sm[0].str();

According to the documentation (v1.67) this should work.
What am I doing wrong here ?

Best regards

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