Chet Ramey wrote: > Peter Volkov wrote: > > Please CC my email to answers as I'm not subscribed to the list. > > $ [[ "string" =~ "[a-z]" ]] && echo something > > something > ... > The real question is whether or not quoting the pattern should work as > it does with other [[ pattern matching operators, which is to quote any > characters special to the matching engine. I think it should, for > consistency.
Could you give an example of how you think it should work? (Just curious and trying to keep up.) Are you thinking that this should match: [[ "string" =~ [a-z] ]] && echo matched || echo not matched Which this should not match? [[ "string" =~ "[a-z]" ]] && echo matched || echo not matched Thanks Bob _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash