Boost logo

Boost Users :

From: L.P. Mergen (mergenlp_at_[hidden])
Date: 2004-11-01 10:09:51


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 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