Following regex comparison is failing, Please suggest what could be the reason.
std::string pattern = "(ABC '.*' and '.*' DEF)";
std::string val     = "(ABC '&' and '|' DEF)";
try
{
    boost::regex re(pattern, boost::regex::extended);
    if(boost::regex_match(val, re))
        cout << " matched"<< std::endl;
    else
        cout << " no match " << std::endl;
}
catch(...)
{
    cout << " Exception" << std::endl;
}
O/P -- no match
Pattern matches successfully with POSIX regex(regcomp) but with TCL regex also pattern doesn't match.
Please suggest what could be the reason.
