I am matching a very simple regular expression in bash on OS X 10.11:$ msg='[4]  the message'$  [[ $msg =~ (.+)\t(.+) ]]$ echo ${BASH_REMATCH[1]}[4]$ echo ${BASH_REMATCH[2]}he messageBetween the ']' and the 't' of $msg is a tab character. There is no tab in either ${BASH_REMATCH[1]} or ${BASH_REMATCH[2]}. Where did the 't' go?
Simple Bash regular expression match missing char (OS X)
bash;regular expression