Boost logo

Boost :

From: David Brownell (brownell_at_[hidden])
Date: 2001-08-28 12:33:37


Man, do I feel stupid! :) Sorry about the confusion, and thanks for your
help!

-----Original Message-----
From: John Maddock [mailto:John_Maddock_at_[hidden]]
Sent: Tuesday, August 28, 2001 5:01 AM
To: INTERNET:boost_at_[hidden]
Subject: RE: [boost] regex: .*xxx.*

>I am using VC6SP5 and Boost version 1.24.0. Here is the test code that
>I
am
>using:

You really had me worried for a time there - you are passing regex compile
flags to the match flags (they are different things) you should use:

int main(void)
{
    boost::regex e(".*Test.*", FLAGS);
    boost::cmatch m;

    if(regex_match("A Test", m, e))
    {
       cout << "matched \"A Test\"" << endl;
    }
    if(regex_match("Testing 123", m, e))
    {
       cout << "matched \"Testing 123\"" << endl;
    }
    if(regex_match("foo", m, e))
    {
       cout << "matched \"foo\"" << endl;
    }
    return(true);
}

- John Maddock http://ourworld.compuserve.com/homepages/john_maddock/

Info: http://www.boost.org Unsubscribe:
<mailto:boost-unsubscribe_at_[hidden]>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk