Regular Expression : bash 3 vs bash 4
<p>The follow code with a regular expression check does not outputs the same result between bash 3 and bash 4: </p>

<pre><code>TESTCASE="testcase0"
[[ ${TESTCASE} =~ "^testcase[0-9\.]*$" ]]
echo $?
echo ${BASH_REMATCH}
</code></pre>

<p>bash 3.2 outputs a successful regular expression check:</p>

<pre><code>0
testcase0
</code></pre>

<p>bash 4.1 fails the regular expression check:</p>

<pre><code>1
&lt;empty line&gt;
</code></pre>

<p>I can't identify where in my regex pattern the expressions fails. I would need a code compatible between both version of bash. </p>

<p>Does anyone have a clue on what's my problem ?</p>

<p>Thanks ! </p>