bug-bash
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]