8#if !defined(ALIB_C20_MODULES) || ((ALIB_C20_MODULES != 0) && (ALIB_C20_MODULES != 1))
9# error "Symbol ALIB_C20_MODULES has to be given to the compiler as either 0 or 1"
16#if ALIB_FEAT_BOOST_REGEX && (!ALIB_CHARACTERS_WIDE || ALIB_CHARACTERS_NATIVE_WCHAR)
17# include <boost/regex.hpp>
27#if ALIB_FEAT_BOOST_REGEX && ALIB_CHARACTERS_WIDE && !ALIB_CHARACTERS_NATIVE_WCHAR
28# pragma message ( "Warning: Class RegexMatcher will not be available, because ALIB_CHARACTERS_NATIVE_WCHAR is false." )
31#if ALIB_FEAT_BOOST_REGEX && (!ALIB_CHARACTERS_WIDE || ALIB_CHARACTERS_NATIVE_WCHAR)
38 delete reinterpret_cast<boost::regex*
>(
boostRegex );
43 if( pattern.IsNull() )
46 boost::basic_regex<character>* regEx;
48 boostRegex= (regEx=
new boost::basic_regex<character>() );
50 regEx=
reinterpret_cast<boost::basic_regex<character>*
>(
boostRegex );
52 regEx->assign( std::basic_string<character>(pattern.Buffer(),
size_t( pattern.Length() ) ) );
60 return boost::regex_match(std::basic_string<character>(haystack.Buffer(),
size_t( haystack.Length() )),
61 *
reinterpret_cast<boost::basic_regex<character>*
>(
boostRegex ) );
ALIB_DLL ~RegexMatcher()
Destructor.
ALIB_DLL void Compile(const String &pattern)
ALIB_DLL bool Match(const String &haystack)
strings::TString< character > String
Type alias in namespace alib.