I created a text file and put some email addresses in it. Then I used grep to find them. Indeed it worked:
# pattern="^[a-zA-Z0-9]+@[a-zA-Z0-9]+\.[a-z]{2,}"
# grep -E $pattern regexfile
but only as long I kept the -E option for an extended regular expression. How do I need to change the above regex in order to use grep without -E option?
fred-smith@company.com
. Many other examples. – Chris Johnson Sep 19 '15 at 18:45