Boost logo

Boost :

From: ozawa_at_[hidden]
Date: 2001-08-22 04:16:42


Hello.

On Tue, 21 Aug 2001 10:49:32 -0700
Darin Adler <darin_at_[hidden]> wrote:

> The problem you are having is mentioned in the documentation.
>
>
> http://www.boost.org/boost/libs/regex/template_class_ref.htm#query_match>
>
> There is at least one simple workaround. You can do this:
>
> const char* str = "bbb";
> boost::regex_match(str, str + std::strlen(str), results, regex);
>
> -- Darin

Thank you, Darin.
With your workaround, wchar_t version works well, too.

boost::reg_expression<wchar_t, boost::c_regex_traits<wchar_t> > regex(L"aaa");
boost::wcmatch results;
const std::wstring str = L"bbb";
boost::regex_match(str.begin(), str.end(), results, regex);

takuma


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk