String:
name@gmail.com
Checking for:
@
.com
My code
if [[ $word =~ "@" ]]
then
if [[ $word =~ ".com" || $word =~ ".ca" ]]
My problem
name@.com
The above example gets passed, which is not what I want. How do I check for characters (1 or more) between "@" and ".com"?