Bram Kuijper wrote:

I am quite new to vim and just started to use regular expressions to replace certain amounts of text. For example, in the following piece of text I ...


Whoops! Looks like I removed the first column, but you wanted to keep just the first column.

Try

:%s/\s*|.*$//

which matches any amount of whitespace followed by a bar, followed by anything to end-of-line. Replace with nothing.

Regards,
Chip Campbell




Reply via email to