$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: John Maddock (john_at_[hidden])
Date: 2007-08-30 05:37:42
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 <class ST, class SA>
   explicit basic_regex(const basic_string<charT, ST,  SA>& p, flag_type f = 
regex_constants::normal);
   template <class InputIterator>
   basic_regex(InputIterator first,  InputIterator last, flag_type f = 
regex_constants::normal);
HTH, John.