I am trying to validate user input
if ! [[ "$operator" =~ ("[+-/*]") ]] ; then # validate user input to include decimals
exec >&2; echo "error: Not a valid number, please try again";
echo
else
break
echo
fi
Tried numerous combinations and not working? Ypu help would be greatly appreciated!