|
From: | Greg Hill |
Subject: | RE: line-spanning regexp |
Date: | Wed, 15 Jan 2003 13:46:17 -0800 |
At 12:00 PM -0600 1/15/03, Bingham, Jay wrote: <snip>
Earlier versions of Emacs require a different construct, the regexp to use in those versions is: "string1\\(\\|[^\n]\\)*[\n]?\\(\\|[^\n]\\)*string2" See http://www.emacswiki.org/cgi-bin/wiki.pl?NonGreedyRegexp for more information.
Jay,Thanks for pointing that out. I didn't know about this hack for non-greedy searches in pre-21 emacs.
Unfortunately the web page you cited doesn't really explain it, just calls it a "hack" and provides a single minimalist example. I'm sure I could remember it better and use it more effectively if I understood why it works, but that is not apparent to me. Are you aware of a more in-depth discussion of this topic that I could consult?
Thanks. --Greg
[Prev in Thread] | Current Thread | [Next in Thread] |