Dudley Fox wrote: > Starting text: > nameTable[pattern with spaces0] = ("pattern with spaces0", 12345) > > Desired Text: > nameTable[patternwithspaces0] = ("pattern with spaces0", 12345)
Notwithstanding the usefulness of sub-replace-special, which I also discovered in this thread, I find zero-width look-ahead/behind assertions to be very powerful: :%s/\v(\[[^]]*)@<=\s//g ( \[ [^]]* )@<= \s I also happen to like \v, but that's just syntactic sugar! Tobia