1 2 3 4 5 6 | p
= "((a b (f+\\.))d d(\\3))"; str="a b ffff.d dfff."; boost::regex pattern(p, boost::regex::icase&boost::regex::extended &~boost::regex::no_bk_refs); bool match = boost::regex_match(str, pattern); cout << str << ((match)?"-Pattern is legal":"-Pattern is illegal" )<< endl; |
Pattern is illegal |
str="a b ffff.d dffff."; |
p = "((a b (f+\\.))d d(f+\\.))"; |