Boost-users][regex] Can I use NULL char (ascii \x00) as a part of boost_regex regular expression

I want to use NULL char i.e ascii \x00 as a part of my regular expression. Does boost_regex support this? For examples: regular expression: ab\0cd matching char sequence: ab\0cd I expect ot get match a match for full expression ab\0cd How can I achieve this using boost_regex. Regards, Chandan. ____________________________________________________________________________________ Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

Chandan Nilange wrote:
I want to use NULL char i.e ascii \x00 as a part of my regular expression. Does boost_regex support this?
For examples:
regular expression: ab\0cd matching char sequence: ab\0cd I expect ot get match a match for full expression ab\0cd
How can I achieve this using boost_regex.
Sure, for example any of the following constructors can accept an embedded
NULL:
basic_regex(const charT* p1, const charT* p2, flag_type f =
regex_constants::normal);
basic_regex(const charT* p, size_type len, flag_type f);
template

Hi, I'm trying to bind Win32 API function RegCloseKey
like this (I'm using VC 2005 Express):
HKEY hKey;
//--initialize hKey
boost::function

On 8/31/07, Kamil Zubair
Hi, I'm trying to bind Win32 API function RegCloseKey like this (I'm using VC 2005 Express):
HKEY hKey; //--initialize hKey boost::function
RegClose = boost::bind(&RegCloseKey, hKey);
It seems that Boost.Bind can't handle __stdcall functions. Fortunately
Boost.Function can. Try this as a workaround:
HKEY key;
function

Kamil Zubair:
Hi, I'm trying to bind Win32 API function RegCloseKey like this (I'm using VC 2005 Express):
HKEY hKey; //--initialize hKey boost::function
RegClose = boost::bind(&RegCloseKey, hKey);
You can either #define BOOST_BIND_ENABLE_STDCALL or use boost::bind<LONG>. See http://boost.org/libs/bind/bind.html#Q_win32_api
participants (5)
-
Chandan Nilange
-
John Maddock
-
Kamil Zubair
-
Peter Dimov
-
Slavomir Kaslev