This looks so simple but it isn't:[[ 1234+5678 =~ [0-9]+(\s*(\-|\*)\s*[0-9]+)* ]] && echo $?returns a 0. However, it actually should not do that, as only minus (-) and multiplication (*) operator are allowed.Also, I grabbed some regex tool in the net and tried to match this pattern: result was the null string. (as expected)In prose, this extended regex reads:look for number (mandatory)check if there is some white spaceoperator must be either a - or a *check if there is some white space (again)look for another number (must be there if preceded by an operator)Also, the asterisk following the expression in parentheses says that 2nd to nth operator-number pair is optional.Where is my mistake in thinking here? 
Shell pattern matching and arithmetic operators (+ - * / %)
bash;regular expression;patterns