On 02/23/2011 05:25 AM, Greg Wooledge wrote: > 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).
Right. Mostly you're fine as long as you avoid special backslash sequences like \s or \w, etc, and the special lookahead or non-grouping parens (anything that starts "(?" is perl-specific). -- Micah J. Cowan http://micah.cowan.name/