I need help as to why code B is producing a different result
x=TEST_DATA_12345678_TST_87456321
The code below (CODE A) produces the correct output (match)
if [[ $x == TEST_[A-Z][A-Z][A-Z][A-Z]_[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]_[A-Z][A-Z][A-Z]_[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] ]]; then echo "match"; else echo "non match"; fi
However, the below (CODE B) produces a wrong output (no match)
if [[ $x == TEST_[A-Z]{4}_[0-9]{8}_[A-Z]{3}_[0-9]{8} ]]; then echo "match"; else echo "non match"; fi