[regex] - Doubts of a regex beginner on boost::regex getting aborted.

Hi, I have 2 doubts 1) Why is regex expr("Resurfacing.*?Home", boost::regex::icase) getting aborted. ? 2) How to make boost regex behave like perl regex ? I mean "dot" in boost::regex is taking new lines as well. How to prevent this ? Is "boost::regex::perl" flag the answer to the question ? Thanks in advance Kiran.

kiran wrote:
Hi, I have 2 doubts
1) Why is regex expr("Resurfacing.*?Home", boost::regex::icase) getting aborted. ?
That should be regex expr("Resurfacing.*?Home", boost::regex::icase | boost::regex::perl)
2) How to make boost regex behave like perl regex ? I mean "dot" in boost::regex is taking new lines as well. How to prevent this ? Is "boost::regex::perl" flag the answer to the question ?
Pass match_not_dot_newline to the regex-matching algorithm you're calling. John.
participants (2)
-
John Maddock
-
kiran