tags:

views:

275

answers:

2

Hello all,

I've got a problem with the following Boost regular expression,

boost::regex e("=");
if(regex_search("=", e)) cout << "yeah";

Can anybody please tell me why I don't get a "yeah"? This is Boost 1.37 with Visual Studio 2008. Thank you very much in advance!

+1  A: 

Using that same code, I do get the "yeah" here.

Note that I had to add boost:: to the beginning of regex_search, and that I'm running on GCC under Linux. I don't have Boost 1.37 set up under Windows yet, so I can't easily test it there.

Head Geek
+1  A: 

I just tried the code you gave, on Visual Studio 2008, with Boost 1.37, and it compiles, runs, and outputs "yeah". Are you sure you set up Boost correctly?

Luc Touraille
Yup. Works for me, too, and I have the same setup.
drby