|
Boost Users : |
Subject: Re: [Boost-users] Regex question: is this a bug or a feature?
From: Kulti (kultihell_at_[hidden])
Date: 2011-03-28 03:04:06
On Mon, Mar 28, 2011 at 4:07 AM, Ramon F Herrera <ramon_at_[hidden]> wrote:
>
>
> My pattern matching was failing when I had these definitions, which I happen
> to prefer:
>
> const string number = "[0-9]+";
> const string name = "[A-z][A-z0-9]*";
>
> ("name" is supposed to match a typical variable name)
>
> The program is working fine now, after I am using these ones:
>
> const string number = "\\d+";
> const string name = "[A-z]\\w*";
>
> The only difference that I aware of, is that the second form accepts
> underscores as part of variable names.
>
> TIA,
>
> -RFH
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Could you please read documentation before posting question?
http://www.boost.org/doc/libs/1_45_0/libs/regex/doc/html/boost_regex/syntax/character_classes/std_char_clases.html
"w - Any word character (alphanumeric characters plus the underscore)"
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