I need to perform regex query replace, such that
foo
in foo bar
is matched, but foo
in foo baz
is not. Normally I would use regex look ahead, e.g. foo(?=bar)
.
However, it seems like Emacs cannot do this? Vim seems capable, but evil mode in spacemacs cannot.
perl
can work in some use cases.