Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

wregex not working with variable but working with constant?

14 views
Skip to first unread message

A

unread,
May 25, 2010, 1:06:01 PM5/25/10
to
Why... oh why... this won't work and won't match anything:

UnicodeString str = "text123";

boost::wregex e(L"text[0-9]+");
if (boost::regex_match(str.w_str(), e))


while this works perfectly and matches the string as it should???

boost::wregex e(L"text[0-9]+");
if (boost::regex_match(L"text123", e))


what am I missing here people? help!
also, is wregex the optimal for matching UnicodeStrings (UTF-8 in my case)?


Pieter Zijlstra

unread,
May 25, 2010, 6:35:35 PM5/25/10
to
A wrote:

> what am I missing here people? help!

If you don't get help here you may want to try the forums at
http://forums.embarcadero.com
(you can also reach them using a newsreader, but you do need an EDN
account to be able to post)

--
Pieter

"Do not do an immoral thing for moral reasons."
-- Thomas Hardy

0 new messages