Parsing required text from a given file is a common task that we encounter in text processing. Items such as e-mail, URL, and so on can be found out with the help of correct regex sequences. Mostly, we need to parse e-mail addresses from a contact list of a e-mail client which is composed of many unwanted characters and words or from a HTML web page.
This problem can be solved with utilities egrep.
The regular expression pattern to match an e-mail address is:
$ cat url_email.txt this is a line of text contains,<email> #firstname.lastname@example.org. </email> and email address, blog "http://www.google.com", email@example.com ...