I'm following the bash manual and regex guide to do my script, but it doesn't work. The script always accepts all strings or numbers and doesn't follow the format.
This is a valid input: feat: RQ01_HelloWorld. ty
#!/usr/bin/env bash --posix
MSG="$1" 
FEAT=/feat:[[:space:]]RQ[[:digit:]]+_[[:alpha:]]+/
if [[ $MSG=~$FEAT ]]
    then
    echo "yeah"
else
    echo "is wrong"
    exit 1
fi
 
     
    