help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: delete text block with regexp


From: Stefan Monnier
Subject: Re: delete text block with regexp
Date: Sun, 16 Nov 2003 23:42:37 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> The critical part is that "." matches anything but a newline.
> Therefore use "\(.\|\n\)" for any character or a newline.

Beware: such a regexp tends to suffer from the "regexp stack overflow"
problem.  Better use \(.*\n\)*.* which is equivalent but uses a lot
less stack space.

Sadly, to understand why you need to understand details of how the regexp
matching happens to be implemented in Emacs.


        Stefan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]