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

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

Re: How to automatically escape regex characters for regex search?


From: tomas
Subject: Re: How to automatically escape regex characters for regex search?
Date: Sun, 6 Nov 2022 10:19:02 +0100

On Sun, Nov 06, 2022 at 12:10:47PM +0300, Jean Louis wrote:
> 
> Is there any Emacs function to automatically escape regex characters
> for regex searches?
> 
> For example I wish to search for "- [ ]" but I wish to automatically
> escape that, not in hard coded way, but in such way that I can use any
> string and that regex character like "[ ]" get escaped.

regexp-quote

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature


reply via email to

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