Boost Users :
Subject: Re: [Boost-users] Boost [Regex] (grep Falg) Why doesn't this patternmatch?
From: John Maddock (john_at_[hidden])
Date: 2013-12-27 11:04:31
> In Boost Help, following is documented.
> Link -
> When an expression is compiled with the flag grep set, then the expression
> is treated as a newline separated list of POSIX-Basic expressions, a match
> is found if any of the expressions in the list match, for example:
> boost::regex e("abc\ndef", boost::regex::grep);
> will match either of the POSIX-Basic expressions "abc" or "def".
Right, but you're *not* passing a newline separated list, you're passing a
\\n which is interpreted as an escape sequence matching a newline literal.
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