Here's the code - thanks in advance for any help!
BOOL RegularExpressionMatch(const char *pstrRegEx, const char
*pstrExpression, BOOL bCaseSensitive)
{
BOOL bRet;
if(!pstrRegEx || !pstrExpression)
return FALSE;
try
{
int nCase = boost::regbase::normal;
if(bCaseSensitive == FALSE)
{
nCase |= boost::regbase::icase;
}
boost::regex expression(pstrRegEx,nCase);
if(boost::regex_match(pstrExpression, expression))
{
bRet = TRUE;
}
else
{
bRet = FALSE;
}
}
catch(CSEHWrapper a)
{
if(pstrRegEx)
{
printf("ERROR: RegularExpressionMatch(%s):
Exception %s ocurred", pstrRegEx, GetExceptionDesc(a.m_nSeCode));
}
else
{
printf("ERROR: RegularExpressionMatch():
Exception %s ocurred", GetExceptionDesc(a.m_nSeCode));
}
bRet = FALSE;
}
catch(...)
{
}
return bRet;
}
--- In Boost-Users@yahoogroups.com, "John Maddock"
Tried to use the forward lookahead asserts, both positive and negative and could not make a match. Is there some sample code anywhere or a tip to explain where I went wrong?
Please post an example of what you're trying to do.
John.