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?
[email protected]
. Many other examples. – Chris Johnson 13 hours ago