Well, it looks like that did affect it, according to a http://en.wikipedia.org/wiki/Bash#In-process_regular_expressions
Basically, the single quotes surrounding the regex become part of the regex. So the above code becomes:
if [[ "foo.tex" =~ ^(.*)\.tex$ ]] then file=${BASH_REMATCH[1]} echo "File is: $file" else echo "Not a TeX file" fi
That's a pretty significant change. A lot of scripts will be broken. More warning should have been given to users about this.
Well, it looks like that did affect it, according to a en.wikipedia. org/wiki/ Bash#In- process_ regular_ expressions
http://
Basically, the single quotes surrounding the regex become part of the regex. So the above code becomes:
if [[ "foo.tex" =~ ^(.*)\.tex$ ]] ${BASH_ REMATCH[ 1]}
then
file=
echo "File is: $file"
else
echo "Not a TeX file"
fi
That's a pretty significant change. A lot of scripts will be broken. More warning should have been given to users about this.