bash regex =~ case insensetive, possible?

It can get very annoying that bash regex =~ is case-sensetive, is there a way to set it to be case-insensetive?

if [[ "$1" =~ "(test)" ]]; then
  echo match
else 
  echo no match
fi

A few seconds with the bash man page reveals:

shopt -s nocasematch

You are not testing against a regex; you are testing against a string. To test a regex, remove the quotes from the right-hand side.

It doesn't work, here's how I tested it:

if [[ "$1" =~ "(test)" ]]; then
  echo match with quotas
else
  echo no match with quotas
fi

if [[ "$1" =~ \(test\) ]]; then
  echo match without quotas
else
  echo no match without quotas
fi
[21:56:45] root:~# shopt -s nocasematch
[21:59:29] root:~# ./test Test
no match with quotas
no match without quotas

Edit:

GNU bash, version 3.1.17(1)-release (x86_64-pc-linux-gnu)
if [[ "$1" =~ (test) ]]; then
  echo match
else
  echo no match
fi

./test: line 10: unexpected argument `(' to conditional binary operator
./test: line 10: syntax error near `(t'
./test: line 10: `if [[ "$1" =~ (test) ]]; then'

I didn't use \( \) for no reason :>

And I have also tested '(test)' and test

It works without the backslashes in bash 3.2 (released almost 3 years ago, in 1996) and later.

GNU bash, version 4.0.0(1)-release (x86_64-unknown-linux-gnu)
if [[ "$1" =~ "(test)" ]]; then
  echo match 1
else
  echo no match 1
fi

if [[ "$1" =~ \(test\) ]]; then
  echo match 2
else
  echo no match 2
fi

if [[ "$1" =~ '(test)' ]]; then
  echo match 3
else
  echo no match 3
fi

if [[ "$1" =~ (test) ]]; then
  echo match 4
else
  echo no match 4
fi
[23:32:05] root:~# shopt -s nocasematch
[23:32:22] root:~# ./test Test
no match 1
no match 2
no match 3
./test: line 22: unexpected argument `(' to conditional binary operator
./test: line 22: syntax error near `(t'
./test: line 22: `if [[ "$1" =~ (test) ]]; then'
echo $BASH_VERSION
shopt -s nocasematch
shopt nocasematch | grep nocasematch
if [[ "$1" =~ "(test)" ]]; then
  echo match 1
else
  echo no match 1
fi

if [[ "$1" =~ \(test\) ]]; then
  echo match 2
else
  echo no match 2
fi

if [[ "$1" =~ '(test)' ]]; then
  echo match 3
else
  echo no match 3
fi

if [[ "$1" =~ (test) ]]; then
  echo match 4
else
  echo no match 4
fi
$ xx.sh Test
3.1.0(1)-release
nocasematch     on
match 1
match 2
match 3
xx.sh: line 25: unexpected argument `(' to conditional binary operator
xx.sh: line 25: syntax error near `(t'
xx.sh: line 25: `if [[ "$1" =~ (test) ]]; then'
$ xx.sh Test
3.2.33(8)-release
nocasematch     on
no match 1
no match 2
no match 3
match 4
$ xx.sh Test
4.0.0(2)-release
nocasematch     on
no match 1
no match 2
no match 3
match 4

Ok now it works... I though that setting shopt -s nocasematch is global... Thanks