Bug 800750

Summary: bash 4.2.10 doesn't support =~ operator?
Product: [Fedora] Fedora Reporter: Freax <holmes86>
Component: bashAssignee: Roman Rakus <rrakus>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: maxamillion, rrakus, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-07 12:43:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Freax 2012-03-07 06:50:06 UTC
Description of problem:
I execute the command as follow on Bash 4.2.10 of Fedora 16:
$ [[ "abcd" =~ "a.*d" ]] && echo true
$ 

As Bash 3.2.25 of RHEL 5.4:
$ [[ "abcd" =~ "a.*d" ]] && echo true
true


Version-Release number of selected component (if applicable):
Bash 4.2.10

How reproducible:
[[ "abcd" =~ "a.*d" ]] && echo true

Steps to Reproduce:
1.
2.
3.
  
Actual results:
can echo "true"

Expected results:
doesn't echo "true"


Additional info:

Comment 1 Roman Rakus 2012-03-07 12:43:58 UTC
It was bug in previous versions. See documentation. When you use double quotes "" the pattern is matched as string.