Boost logo

Boost Users :

Subject: Re: [Boost-users] Regular Expression (vers. 1.34.1)
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-05-05 10:23:21


AMDG

Salvatore Benedetto wrote:
> On 5 May 2010 16:10, Nat Goodspeed <nat_at_[hidden]> wrote:
>
>> This might (or might not) work better:
>> "\\.\\/\\w+(\\.txt)"
>>
>
> Indeed I was missing a backslash.
>
> The following worked as I expected.
>
> std::string expression("\.\/\\w+(\.txt)");
>

Actual not. The first level of backslashes is
processed by C++. The regex library never sees
them. This pattern with match
x/filename-txt, since . is a wild card.

In Christ,
Steven Watanabe


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