Boost logo

Boost Users :

Subject: Re: [Boost-users] Xpressive Character Literals
From: Eric Niebler (eric_at_[hidden])
Date: 2009-08-05 14:50:40


Etienne Philip Pretorius wrote:
> Hello List,
>
> Just a quick question;
>
> Xpressive seems not to compile when I use 0x?? instead of 'a' for
> regular expressions.
>
> Eg. sregex characters = +(set=0x20,0x0A,0x0D,0x20,0x33);

Yes, because xpressive expects chars, not ints.

> Is there perhaps a way to accomplish this in Xpressive?

Untested:

sregex characters = +(set='\x20','\x0A','\x0D','\x20','\x33');

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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