我正在尝试验证用户输入
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
尝试了多种组合但不起作用?Ypu 的帮助将不胜感激!