I start regex search by C-M-s.

After typing in some pattern, I would like to edit the pattern shown in the bottom bar. But it seems that I can only append new characters at the current pattern, but I can't figure out how to erase the current pattern, (every time hitting backspace key will erase the text in the buffer window not in the bottom bar).

How shall I edit the search regex pattern?

How shall I start over the search i.e. without previous entered regex pattern?

1 Answer 1


To delete the last character from the search pattern use C-M-w. You can also enter the minibuffer with M-e and then edit the search string.

  • And after editing with M-e, just use C-M-s again.
    – Drew
    Sep 24, 2014 at 15:40

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.