|
Boost Users : |
Subject: Re: [Boost-users] [xpressive] literals in regex without escaping...
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2011-05-27 08:15:18
On Fri, May 27, 2011 at 2:07 PM, Ovanes Markarian <om_boost_at_[hidden]>wrote:
> Hello *,
>
> I need to parse some logger lines using boost xpressive. The line looks
> like:
>
> fname:line_no [severity] logging message
>
> When building the xpressive regex if I need to match the severity (e.g.
> [INFO]) I need to escape the square brackets... Is there some xpressive
> construct (like as_xpr) which makes from all characters literals. So that I
> can write smth like:
>
> sregex re = *_ >> literals("[INFO]") >> *_
>
> It seems that C++ literals are regex literals by default, so there is no
need in literals(...) at all...
Sorry for noise.
Ovanes
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