I have a situation like
something 'text' something 'moretext'
I forgot to add more spacing the first time I created this file and now on each line I should put some whitespace before the 2nd occurence of '
.
Now I can't build a regex for this.
I know that:
- my command should begin with
:%s
because I want it to be executed on all lines - I should use the
{2}
operator to pick the 2nd occurence ? - If my regex will match something I can put stuff before the match with
&
The main problem for me is how to build a regex to match the second '
using the {}
notation, it's frustrating because I don't where it's supposed to be inserted or if I should use the magic or non-magic regex in vim.
The result I'm looking for
something 'text ' something 'moretext'