[lug] control-v in vi with search and replace
Andrew R. Diederich
diederic at boulder.net
Thu Aug 2 10:59:42 MDT 2001
I'm trying to clean up a script (the script command) with all the nasty
control characters that come out of it. The string I'm trying to null is:
^[[13C and the ^[ is a control-[. I've been able to match the string
:m/^V^[[13C and it matches just fine. However, when I try a search and
replace with it:
:%s/^V^[[13C//g
I get a Pattern not found - ^[[13C//g, which isn't what I want at all.
I have really good luck getting out carriage returns with :%s/^V^M//g, so
I'm not sure why the thing above doesn't work.
Any ideas? I've looked a bit in my leanring VI book, but no joy.
--
Andrew
diederic at boulder.net
More information about the LUG
mailing list