Page 1 of 1

VIM regular expression

Posted: Fri Jul 06, 2007 3:24 am
by phpist
Hello everyone,
I have a bothersome problem here with a huge XML file. The creator of XML file is using UTF-16 character set and some special characters are included to the file. My problem is starting at right here.
I have tried to replace special characters with Regular Expression in VIM. But doesn't work and getting that error:

E488: Trailing characters

Here is the regular expression:

s 1,$ s/^v//g

I'm not sure about the regular expression above. Do i something wrong?

Thank you for your time.

Umut

Posted: Thu Jul 12, 2007 6:33 pm
by ReverendDexter
Well, for Vim, you shouldn't be doubling up on the 's'

try :%s/^v//g

though, admittedly, I'm not sure what the ^v is here, unless you're meaning ctrl-v, as in paste.

Posted: Sun Jul 15, 2007 3:04 pm
by Weirdan
ReverendDexter wrote:though, admittedly, I'm not sure what the ^v is here, unless you're meaning ctrl-v, as in paste.
String starting with 'v' ?

Posted: Mon Jul 16, 2007 10:10 am
by ReverendDexter
It's always gotta be the obvious, doesn't it? Heh... when I made that last post I had been staring at the Vim manual for about an hour...

So, og poster, did that help at all?