Boost logo

Boost Users :

Subject: [Boost-users] Regex alternation in xpressive
From: Surya Kiran Gullapalli (suryakiran.gullapalli_at_[hidden])
Date: 2010-03-11 04:29:43


Hello all,
I'm trying to match ordinal numbers (1st, 2nd, 3rd, 4th etc) like this.

*xpr::as_xpr ("Some Text") *
* >> xpr::repeat<1, 2>(_d) *
* >> ("st"|"nd"|"rd"|"th") ;*

Compilation fails at 3rd line with the following error

error C2296: '|' : illegal, left operand has type 'const char [3]' ;

what am i missing ? did I give the construct correctly ?

Thanks in advance,
Surya



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