Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-08-28 07:00:59


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


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