oskar wrote:

I have a vim script which I want to use to search & replace a part out of a
given line. The fields in the line are based on field length and the field I
want to change starts at position 33 and ends after 4th character.

A regex search is not appropriate, as the string I am looking for may occur
in another field in the same line but should not be changed here. I already
tried substitute() and had a look to the normal command :s with a subset,
but none of them worked for me.

There are other ways, but it seems the easiest is to use a regexp in a substitute:

[range]s/\%33c.\{4}/-NEW/

(pick your range, of course)

Regards,
Chip Campbell

Reply via email to