|
Boost Users : |
From: tweety (mitea_at_[hidden])
Date: 2004-11-01 12:16:43
Why not use regex_search?
----------------------------------
Peace and love,
Tweety
mitea_at_[hidden] - tweety_04_01_at_[hidden]
YahooID: tweety_04_01
> -----Original Message-----
> From: boost-users-bounces_at_[hidden]
> [mailto:boost-users-bounces_at_[hidden]] On Behalf Of L.P. Mergen
> Sent: Monday, November 01, 2004 10:10 AM
> To: boost-users_at_[hidden]
> Subject: [Boost-users] boost::regex partial matches
>
> Hello,
>
> I apologise in advance if this question is not direct to the right
> mailinglist, but this was the best I could find. The IRC channel also
> seems very quite... :)
>
> I am currently experimenting with the boost::regex library,
> and so far it
> seems to do just the thing I need. However, when I have a regex
>
> "[0-9]+[a-zA-Z]+"
>
> And want to match this against the string
>
> "42foo 42bar"
>
> It returns false. This is (as far as I can see) due to the
> library not
> taking partial matches too, even when I set the
> boost::match_partial and
> boost::match_any flags (which, according to my
> interpretation, should be
> doing the trick).
>
> Here is my statement:
>
> bool success = boost::regex_match(subject->c_str(), returns,
> expression, boost::match_partial | boost::match_any);
>
> I hope anyone has an idea what might be the problem here. Thanks in
> advance! :)
>
> Grt,
>
> Leon Mergen
> _______________________________________________
> 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