If I wanted to replace only part of a match with something else in Atom, how would I do that?
A Ruby regex solution would probably work, because Ruby uses a regex engine very much like Oniguruma (which is used by Atom).
I found an Oniguruma manual which says \G sets a match start position, but this doesn't work for me.
I don't think Ruby has direct equivalents to
\zsand\ze, but you can use lookahead((?=pat)) and lookbehind((?<=pat)) to mimic their behavior:Unfortunately, Ruby's lookbehind needs the pattern to be of a fixed size(or several alternatives of fixed size) - a limitation Vim's
\zsdoes not have.