Recipe: Parsing e-mail address, URLs from text egrep regex: [A-Za-z0-9.]+@[A-Za-z0-9.]+\.[a-zA-Z]{2,4} Parsing e-mail addresses ====================== $ cat url_email.txt this is a line of text contains, #slynux@slynux.com. and email address, blog "http://www.google.com", test@yahoo.com dfdfdfdddfdf;cool.hacks@gmail.com

Headign

$ egrep -o '[A-Za-z0-9.]+@[A-Za-z0-9.]+\.[a-zA-Z]{2,4}' url_email.txt slynux@slynux.com test@yahoo.com cool.hacks@gmail.com Parsing URL =========== $ egrep -o "http://[a-zA-Z0-9.]+\.[a-zA-Z]{2,3}" url_email.txt http://www.google.com http://code.google.com