I confuse with condition regex in bash with match if not contain string. I use regex: ^((?!success).)*$
and test online ok
but use it in bash not ok. It not exactly
string="success"
pattern='^((?!success).)*$'
if [[ $string =~ $pattern ]]; then
echo "found"
else
echo "not found"
fi
please help me. enter image description here