[Regex] Case insensitive pb
Hi, Maybe a stupid question but I didn't manage to make my regular expression objects case insensitive. What should I do insted of this : boost::regex* pRegExp = new boost::wregex(sRegExp); ? Thanks. Fred
Hi Fred. I normaly create my object with this boost::regex e("bla bla here is my filter rules", boost::regbase::normal | boost::regbase::icase | boost::regbase::bk_refs); I think the doc for the regex tells gives some good examples for the use of boost_regex. yours eske On Wed, 06 Nov 2002 07:05:28 -0300, f_mayot wrote:
Hi,
Maybe a stupid question but I didn't manage to make my regular expression objects case insensitive. What should I do insted of this : boost::regex* pRegExp = new boost::wregex(sRegExp); ?
Thanks.
Fred
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
There is an 'icase' flag:
icase = literal << 1, // characters are matched
regardless of case
You can turn it on using:
boost::regex* pRegExp = new boost::wregex(sRegExp,boost::regbase::normal |
boost::regbase::icase);
"f_mayot"
Hi,
Maybe a stupid question but I didn't manage to make my regular expression objects case insensitive. What should I do insted of this : boost::regex* pRegExp = new boost::wregex(sRegExp); ?
Thanks.
Fred
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Maybe a stupid question but I didn't manage to make my regular expression objects case insensitive. What should I do insted of this : boost::regex* pRegExp = new boost::wregex(sRegExp);
boost::regex* pRegExp = new boost::regex(sRegExp, boost::regbase::perl | boost::regbase::icase); John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm
participants (4)
-
Edward Diener
-
Eske Christiansen
-
f_mayot
-
John Maddock