Hi,

 

I get the following exception while using a boost regexp matching libraries (with Windows Visual Studio, 7.1 environment).

 

Setup:

 

static RegexClass::RegularExpression re_exp;

 

bool

CMyclass::parseExpression(string expression)

{

      LoggerPtr logger = Logger::getRootLogger();

      ostringstream oss;

RegexClass::RegularExpression *re = &re_exp;

 

      re->Expression = expression;

      RegexClass::RegularExpression::ExpressionErrorCode eec = re->ParseExpression();

   

      if (eec == RegexClass::RegularExpression::REG_NOERROR) {

            oss << "Parse successful: " << expression;

            logger->info(oss.str());

            return true;

    }

    ...

}

 

Matching call:

 

bool

CMyClass::matchSpec(RegexClass::RegularExpression *pRe, const char *stringToMatch)

{

      pRe->SetStringToMatch(stringToMatch);

      if (pRe->Match()) {

            return true;

      }

      return false;

}

 

Exception while using expression matcher on Windows Server 2003 Platforms:

 

Exception Stack Trace

0x0343c900 0x00457374 boost::re_detail::reg_grep2<boost::re_detail::grep_search_predicate<std::basic_string<char,std::char_traits<char>,std::allocator<char> >::iterator,boost::detail::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >::iterator,char,boost::regex_traits<char>,boost::detail::allocator<char>,boost::detail::allocator<char> > 0x00000044

0x0343c924 0x0045a65b boost::regex_search<std::basic_string<char,std::char_traits<char>,std::allocator<char>>::iterator,boost::detail::allocator<char>,char,boost::regex_traits<char>,boost::detail::allocator<char> > 0x0000003b

0x0343c970 0x0045ae66 RegexClass::RegularExpression::Match 0x000001c6

 

Sometimes, I get the following exception:

 

Stack Trace

0x037dc938 0x0045db6e RegexClass::RegularExpressionPimpl::GetMatchingInformation 0x0000027e

0x037dc970 0x0045af19 RegexClass::RegularExpression::Match 0x00000279

0x037dc9a0 0x004370b1 CMyClass::matchSpec 0x00000091 at myclass.cpp(349)

 

Any help would be much appreciated.

 

Thanks.