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

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

Re: regexp problems the evil \[


From: Uwe Brauer
Subject: Re: regexp problems the evil \[
Date: Fri, 24 Mar 2017 17:07:55 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

>>> "Aurélien" == Aurélien Aptel <address@hidden> writes:

   > On Thu, Mar 23, 2017 at 11:11 PM, Uwe Brauer <address@hidden> wrote:
   >> Wow six \ I gave up after five.

   > Yes, it's ridiculous, I personally think emacs lisp regexes are
   > unusable once escapes are involved, especially interactively.
   > You can use rx instead of strings to make regexes from s-expressions.
   > Strings elements are always assumed to match literally (rx will always
   > escape whatever is needed to match the string literally).

   >     (query-replace-regexp (rx "\\[" (group (+ (not (any "}")))) "\\]") ...


Ah thanks did not know about it.

Uwe 




reply via email to

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