tags:

views:

163

answers:

3

I can never remember the differences in regular expression syntax used by tools like grep and awk, or languages like Python and PHP. Generally, Perl has the most expansive syntax, but I'm often hamstrung by the limitations of even egrep ("extended" grep).

Anyone know of a site that lists the differences in a concise and easy-to-read fashion?

+1  A: 

I find this site helpful: http://www.regular-expressions.info/

Other than that, I use the corresponding documentation extensively and I believe, all said and done, there's no way around that.

Konrad Rudolph
+3  A: 

Mastering Regular Expressions, devotes the last 4 chapters to Java, PHP, Perl, and .Net. One chapter for each. From what I know the pocket edition contains just those final four chapters.

Kibbee
A: 

For my own future reference, I'll offer the Regexp Syntax Summary page which contrasts the syntax for grep, egrep, Emacs, Perl, Python, and Tcl. As expected, Perl supports the greatest variety of operators, but Python looks equally capable, if not more so.

yukondude