Write to email@example.com
You can use grep to search for certain pattern in text files, such as html files. For example, you can search for Canadian postal code or Ontario car plate numbers in a text file;
Prepare text file, say grepTest, that consists of sample postal code etc.You can try the commands listed here.
>grep ‘123’ grepTest
grep ‘[a-z][0-9][a-z] [0-9][a-z][0-9]’ grepTest
grep –i ‘[a-z][0-9][a-z] [0-9][a-z][0-9]’ grepTest
click here to the regexTester applet;
Write regular expressions and try the match(), find() methods.