<br><br><div class="gmail_quote">On 8 June 2010 13:46, Dennis Marinus <span dir="ltr"><<a href="mailto:dennis@marinus.nu">dennis@marinus.nu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
On 8 jun 2010, at 14:32, Farkas Levente wrote:<br>
> On 06/08/2010 02:23 PM, Dennis Marinus wrote:<br>
>> On 8 jun 2010, at 14:02, Farkas Levente wrote:<br>
>> Please try<br>
>> if [[ "abc" =~ abc.* ]]; then echo inside; else echo outside; fi<br>
><br>
> it says: "Quoting not necessary, as of version 3.2 of Bash", but not<br>
> said it's a bug. and still use "" in the second and all other examples.<br>
<br>
</div>I agree, the manual contradicts itself. It says both "As of version 3.2 of Bash, expression to match no longer quoted" (meaning: don't quote) and "Quoting not necessary, as of version 3.2 of Bash" (meaning: you don't have to but you can). The difference in behavior is the treatment of special chars.<br>

<br>
In my opinion it's not a bug. Bash is working as designed, but the design has changed between RHEL5 & RHEL6.<br>
<br>
According to <a href="http://tiswww.case.edu/php/chet/bash/FAQ" target="_blank">http://tiswww.case.edu/php/chet/bash/FAQ</a>:<br>
E14) Why does quoting the pattern argument to the regular expression matching<br>
     conditional operator (=~) cause regexp matching to stop working?<br>[snip]<br></blockquote><div><br> <br>The manual page on F13 (and I think on RHEL6) says<br><br>"Any part of the pattern may be quoted to force  it  to  be  matched  as  a string."<br>
<br>So yes, it's changed, but it's not a bug.<br><br>jch<br></div></div>