Subject: Re: [boost] [xpressive] Does '_' match newlines?
From: Eric Niebler (eric_at_[hidden])
Date: 2012-03-19 18:55:14
On 3/19/2012 3:21 PM, Robert Dailey wrote:
> I have the following static regex:
> sregex filename_re =
> icase("Content-Disposition:") >> -*_ >> "filename=" >> (s2=-+_) >>
> I want the "*_" part to also match newline characters. I didn't see any
> flag to turn this on or off. Is this on by default?
It always matches exactly one character, including newlines. If you want
to match one character that is not a newline ('\n'), use ~_n. To match
any one character that is not a logical new line ('\r', '\n', "\r\n",
others), use ~_ln.
-- Eric Niebler BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk