Boost logo

Boost :

From: David Brownell (brownell_at_[hidden])
Date: 2001-08-27 14:18:39


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

Thanks,
Dave

#include<iostream>
#include "boost\regex.hpp"

using namespace std;
using namespace boost;

static const unsigned long FLAGS = regbase::normal | regbase::icase;

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

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

-----Original Message-----
From: John Maddock [mailto:John_Maddock_at_[hidden]]
Sent: Sunday, August 26, 2001 4:26 AM
To: INTERNET:boost_at_[hidden]
Subject: RE: [boost] regex: .*xxx.*

>John, thank you for your quick response. I was able to reproduce the
>correct results with your code, but when I add the flags
>regbase::normal | regbase::icase, I am getting the incorrect results.

Are you sure? What compiler are you using? I've just added those flags to
the test code, and it productes exactly the same matches as without them
(what one would expect in this case).

- 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