Here's a small code snippet that will work. It only matches variable names having chars, numbers or an underscore.
shopt -s extglob
case $word in
*([a-zA-Z0-9_])=*) echo "matched $word" ;;
esac
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

