On 2026-05-26 17:06, Vim Users wrote:
> this works. Is there a niftier way? (ie without capturing the
> context).
>
> :%s/\(.*\)\(18\d\d\)\(.*\)/\2\1\2\3/

You could do something like

  :%s/.*\(18\d\d\)/\1&

if you wanted to simplify it.

-tkc
-- 





-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_use/ahXNPk6-t1Q2Ko0W%40thechases.com.

Reply via email to