It may be handy to make it shortly, for example use (GET|POST): *\{ instead of \(GET\|POST\): *{


Just adapt isearch-search-fun-function:

(defun isearch-extended-regexp-forward ()
  (let ((regexp-chars "[|{}()`=<>]")
        (isearch-message-prefix-add "Extended ")
         (lambda ()
           (lambda (regexp &rest other-args)
             (apply (isearch-search-fun-default)
                regexp-chars "\\\\\\&" regexp t)
    (isearch-forward t)))
  • Excellent! Exactly what I need, thank you!
    – Netsu
    Mar 23 '15 at 6:17
  • Nice workaround!
    – Drew
    Apr 10 '15 at 4:09

I'm afraid that the answer is no - there is no easy, out-of-the-box way to do that.

This has been discussed in the Emacs Dev mailing list a few times now, as a possible extension to Emacs Lisp. Well, not just for Isearch but for regexps in general.

Here are two interesting threads about it: 1 and 2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.