emacs-devel
[Top][All Lists]
Advanced

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

Re: Structural regular expressions


From: Lennart Borgman
Subject: Re: Structural regular expressions
Date: Sun, 12 Sep 2010 16:09:46 +0200

On Sun, Sep 12, 2010 at 3:48 PM, Stefan Monnier
<address@hidden> wrote:
>
> The term "structural regular expression" is indeed misleading, I think.
> They use it to refer to the combination of 2 things:
> 1- the ability to select particular kinds of elements in the text
>   (which we could do in Emacs with non-contiguous regions).  The main
>   example being commands that select "all the strings" or "all the
>   comments" or that inverts the selection (select everything that
>   wasn't selected before).
> 2- the ability to apply regexp-operations to only those selected parts
>   of the text (to the extent that we already have commands that apply
>   only to the active region, we already have that, although it would
>   probably require several tweaks to make it work right in the face of
>   non-contiguous regions).
>
> Together this allows you to do things like apply query-replace to all
> non-string non-comment parts of the buffer, which is why they call it
> "structural" regexps.


There is a related need for searching that could be built on such
capability: AND.

Quite often I find myself searching for a node/a tree in a big .org
file containing both word a and word b.



reply via email to

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