Using Vim, I'd like to be able to replace preVARIABLETEXTpost
with VARIABLETEXT
in a single command. The reason is that pre
and post
might exist elsewhere in the file, and VARIABLETEXT
changes.
Something like:
:%s/preGRABTEXTpost/GRABTEXT/g
Essentially I'm trying to strip pre
and post
when it exists with some text between them on a single line, though it might exist more once on a single line. I just don't know how to make something like a temporary variable . . . help? Thanks for your time.