A
Arnold Smit
Group,
MSVC 2008 seems to have a bug in their tr1::regex<> class.
The following code gives: true & false
#include <regex>
#include <iostream>
using namespace std;
int main()
{
tr1::basic_regex<char> regex("[A-Z]+", tr1::regex::ECMAScript | tr1::regex::icase);
cout<< std::boolalpha << tr1::regex_match("MATCH", regex) << endl; // gives true
cout<< std::boolalpha << tr1::regex_match("MaTcH", regex) << endl; // gives false ?
}
Shouldn't the flag tr1::regex::icase cause the regex to be case insensitive?
Is there a way to accomplish 'ignore case' in the shipped msvc 2008 tr1::regex class,
or should i start looking into boost::regex?
Regards Arnold
MSVC 2008 seems to have a bug in their tr1::regex<> class.
The following code gives: true & false
#include <regex>
#include <iostream>
using namespace std;
int main()
{
tr1::basic_regex<char> regex("[A-Z]+", tr1::regex::ECMAScript | tr1::regex::icase);
cout<< std::boolalpha << tr1::regex_match("MATCH", regex) << endl; // gives true
cout<< std::boolalpha << tr1::regex_match("MaTcH", regex) << endl; // gives false ?
}
Shouldn't the flag tr1::regex::icase cause the regex to be case insensitive?
Is there a way to accomplish 'ignore case' in the shipped msvc 2008 tr1::regex class,
or should i start looking into boost::regex?
Regards Arnold