Forward lookahead - abysmal failure

Hello all, 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? Thanks, Noam

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" <john_maddock@c...> wrote:

Here's the code - thanks in advance for any help!
You don't provide an expression that you think should match and doesn't, but whatever, I suspect that you need to be using regex_search not regex_match (RTM for the difference). John.
participants (2)
-
John Maddock
-
noamxnoam