Boost logo

Boost Users :

From: Winson Yung (winson.yung_at_[hidden])
Date: 2006-07-22 11:06:30


John, I had in the code. It's just when I wrote this in the email, I forgot
to double escape them.
Sorry about that, anyhow it still doesn't work with double escapes.

/Winson

On 7/22/06, John Maddock <john_at_[hidden]> wrote:
>
> Winson Yung wrote:
> >> Hello all, I have the following regular expression, but it doesn't
> >> match to this text "REVENUE
> >> ................................................... $10,481.1"
> >>
> >> const char* pattern[] = "Revenue[\s\.]*\$?\s*([0-9,\.]*)";
>
> Don't you need to double up those escapes? Remember that C++ consumes the
> first \ so you need \\ to pass an escape to the regex engine:
>
> const char* pattern[] = "Revenue[\\s\\.]*\\$?\\s*([0-9,\\.]*)";
>
> HTH, John.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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