Everybody Loves Regular Expressions!

Tags: , , , , , , , , , ,

I’ve had several requests for my “Regular Expressions Quick-Reference/Comparison Chart,” so I’m posting it here. At the moment, it covers the vim-, BRE- (used by ed, sed, and grep), ERE- (used by egrep, and sed -r), and perl- (used by perl (naturally!) and most copies of rename) flavors at the moment. This is still quite a work in progress—I’m considering adding another column (perhaps ruby?), and I’m sure there are at least one or two typos that I’ve let slip through. Please tell me if you find any errors at all, either through comment here or by email.

Regular Expressions Quick-Reference/Comparison Chart (150dpi PNG)
(The requisite preview thumbnail—click to see the 150dpi PNG version.)

After the jump, I’ve attached PDF, postscript, and closely-cropped PNG (150- and 300dpi) versions. I’ve also included my LaTeX source file. Enjoy!

This first release is out of date, last revised on 2008-04-23. See this post for the second version.

My “Regular Expressions Quick-Reference/Comparison Chart,” available under the Creative Commons Attribution-Share Alike 3.0 Licence, comes in the following flavors:

Currently known errors/omissions:

  • From scrooloose (in #vim on irc.freenode.net): “vim has negative lookahead” and possibly other “look” operations. (Note: Check out :h \@! for more info.)

Revisions:

Wednesday, April 23rd, 2008 Reference

3 Comments to Everybody Loves Regular Expressions!

  • Ian00 says:

    Thank you.

  • [...] I’ve fixed some minor errors and expanded the languages covered by my RegEx quick reference chart originally posted here: RegEx Reference Chart v1.0. [...]

  • Haruspex says:

    Now all you have to do is fit this on a business card (front and back is legal).

  • Leave a Reply

    Please leave these two fields as-is: