first-> search("^(Contact|m): .*@(192.168.|10.|172.16)") second-> search("(From|f):.*@foo.bar")
The string is a regular expression. You can find out more about them online (eg: http://sitescooper.org/tao_regexps.html ), or by typing
man 7 regex
at the command line.
"(Contact|m)" means 'either the word "Contact" or the word "m"'.
A caret ^ at the beginning of the regular expression means "only match if the following string is at the beginning of the line" -- so the first expression would match
Contact: che.sosa@192.168.0.1
but would not match
I wish to Contact: che.sosa@192.168.0.1
Have fun,
Paul