In Vim you can find valid e-mail addresses with the command:
/^[a-z0-9][a-z0-9_\.-]*@[a-z0-9][a-z0-9-]*\(\.[a-z0-9][a-z0-9-]*\)*$
Requires that the e-mail address is on a line on it’s own.
Alternatively:
/[a-z0-9][a-z0-9_\.-]*@[a-z0-9][a-z0-9-]*\(\.[a-z0-9][a-z0-9-]*\)*
Will find such addresses anywhere on a line.
Tagged: regex Toggle Comment Threads | Keyboard Shortcuts
-
harlekwinblog
-
harlekwinblog
In Vim you can delete empty lines with the command:
:g/^$/d
-
harlekwinblog
In Vim you can remove duplicate lines with the command:
:%s/^\(.*\)\n\1$/\1/
Reply