String:
name@gmail.com
Checking for:
@ .com
My code
if [[ $word =~ \"@\" ]] then if [[
why not go for other tools like perl:
> echo "x@gmail.com" | perl -lne 'print $1 if(/@(.*?)\.com/)' gmail