Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I insert a tab or a newline in a regexp interactively ?

0
Posted

How do I insert a tab or a newline in a regexp interactively ?

0

You can’t use \n or \t when entering a regexp interactively (when using C-M% – query-replace-regexp for instance). Simply type or C-i to enter a tab (instead of \t) or C-q C-j to enter a newline (C-q quote C-j newline, instead of \n) Note that C-o in regexp replacement string inserts a newline without moving the cursor. So C-o C-f has the same effect as C-q C-j. This trick does not work with incremental search commands.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123