emaillist.txt
1. [email protected]
2. [email protected]
3. saman&[email protected]
4. [email protected]
5. saman@[email protected]
6. saman@mail@com
7. saman.desilva@yahoo com
I want to print valid email addresses but am having trouble figuring this problem out. So far I have this script, but it doesn't print the fully correct output. It still gives me an incorrect output.
sed -nr '/\w+@\w+\.\w+$/p' emaillist.txt
The output:
[email protected]
[email protected]
saman&[email protected]
[email protected]
saman@[email protected]