On Tue, Feb 22, 2011 at 08:03:39PM -0800, Micah Cowan wrote: > Bash's special builtin [[ ]] syntax also provides both wildcards, and > (much more powerful) extended regexes (roughly similar to Perl regexes; > they're what egrep uses).
Just for the record, ERE (Extended Regular Expressions), as used by egrep and by bash's [[ =~ operator, are not the same as PCRE (Perl-Compatible Regular Expressions). Neither bash, nor any POSIX-defined tool, provides PCRE. Some GNU tools that have extensions to the POSIX standard might offer them (the only one I know off hand is GNU grep's -P flag).