Using Emacs in evil-mode, I'm getting problems with regular expressions that include \_
, like e.g.
/TAG1\_.\{-}TAG2
/TAG1\_s*TAG2
For example, the first regular expressión is used in Vim to find any block of text between TAG1
and TAG2
, including blank spaces and new lines. It will match e.g.
TAG1
text
more text TAG2
However, in Emacs evil-mode, as soon as I type \_
, I get a Premature end of regular expression
error message. Other
searches without \_
, as
/TAG1\n*TAG2
work as expected, so the problem is specifically with \_
. I've tried to play a bit with the evil group settings, but to no avail. Any hint where the problem could lie?
P.S.: The issue takes place regardless of whether I use the GUI or not. In Vim I don't get any kind of problems
\_
? – user557597-
doesn't normally need to be escaped. Some homemade engines use features like this to mean meta (example\<
is a beginning of word boundry) – user557597/\_
it saysIncomplete input
. If_
is used without escaping, it is treated as any other character, as expected: e.g./TAG1_s*TAG2
finds the stringTAG1_sTAG2
(but I want to find isTAG1 TAG2
!) – summer