
14 Oct
2003
14 Oct
'03
1:12 p.m.
John Maddock
I see that Regex++ always treats ^ and $ as start and end of line rather than start and end of buffer. Perl does this only if the /m switch is used. Is there a simple way to switch between these two interpretations when compiling a regex?
No but you can use \A and \z for that purpose.
I know that, but I want to be able to interpret user-supplied regexes either way. Maybe I can pre-process them to substitute ^ and $, but that seems awkward.