[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash-4.3.33 regexp bug
From: |
Jason Vas Dias |
Subject: |
bash-4.3.33 regexp bug |
Date: |
Thu, 5 Mar 2015 14:26:48 +0000 |
Good day list, Chet -
I think this is a bug:
( set -x ; tab=$'\011'; s="some text: 1.2.3";
if [[ "$s" =~ ^some text:[\ $tab]+([0-9.]+) ]]; then
echo "${BASH_REMATCH[1]}";
fi
)
-bash: syntax error in conditional expression
-bash: syntax error near `$tab]+([0-9.]+)'
Do you agree ?
If not, what sort of regexp should I use to match ':[<space><tab>]+[0-9]+' ?
The problem happens regardless of whether I use the $tab variable or
a literal '\'$'\011' sequence (sorry, I can't type <tab> in this mailer).
Thanks in advance for any replies,
Regards,
Jason
- bash-4.3.33 regexp bug,
Jason Vas Dias <=
- Re: bash-4.3.33 regexp bug, Eduardo A . Bustamante López, 2015/03/05
- Re: bash-4.3.33 regexp bug, Stephane Chazelas, 2015/03/05
- Re: bash-4.3.33 regexp bug, Greg Wooledge, 2015/03/05
- Re: bash-4.3.33 regexp bug, Stephane Chazelas, 2015/03/05
- Re: bash-4.3.33 regexp bug, Greg Wooledge, 2015/03/05
- Re: bash-4.3.33 regexp bug, Stephane Chazelas, 2015/03/05
- Re: bash-4.3.33 regexp bug, Chet Ramey, 2015/03/06
- Re: bash-4.3.33 regexp bug, Stephane Chazelas, 2015/03/06
- Re: bash-4.3.33 regexp bug, Chet Ramey, 2015/03/06