Vim Regex to replace tags
- by Rudiger Wolf
I am lookin for a regex express to remove the email addresses from a text file.
Input file:
Hannah Churchman <[email protected]>; Julie Drew <[email protected]>;
Output file:
Hannah Churchman; Julie Drew;
I thought a generic regex shuch as s/<(.*?)//g would be a good starting point but I am unable to find the right expression for use Vim?
something like
:%s/ <\(.*?\)>//g
does not work. Error is "E486: Pattern not found:".
:%s#[^ <]*>##g almost works but it leaves the space and < behind.
:%s# <##g to remove the " <" remaining stuff.
Any tips on how to better craft this command?