Subject: Re: regexp does not work as documented

From: Stefan Monnier <[email-masked]>
Date: Sun, 11 May 2008 14:44:55 -0400

> As for making hi-lock-mode detect whether or not a regexp is multi-line,
> isn't that a computationally non-trivial problem?

Well, you can turn the regexp into a DFA, then take the ".*\n.+" regexp,
turn it into another DFA, take the intersection of the two DFAs, and if
it's empty you know your regexp can never match a multiline element.

        Stefan