<created>
[email protected]
</created>
I want to replace the above with but the username may vary i.e,[email protected] ,[email protected]...
<created>
[email protected]
</created>
What is the command to replace this in vim
%s/<created>\r*\r</created>/new string
It worked for me like this:
If you wanted to re-insert the e-mail address you can use:
A bit of explanation:
\n
: newline\s
: spaces and tabs\w
: any word character\(
and\)
: capture what's inside\1
: use the first captured expression