RegExr is an online tool for editing and testing Regular Expressions (RegExp / RegEx). It provides a simple interface to enter RegEx expressions, and visualize matches in real-time editable source text. It also provides a handy RegExp snippet sidebar with descriptions and usage examples to make it easier to learn Regular Expressions through trial and error.
It isn’t as powerful as a product like RegExBuddy, but it has the advantage of being online and free. I will be releasing a free desktop version for Mac OSX and Windows built with AIR in the next day or two.
So far this has only taken a day of development, and the main app is only 150 lines of code. Flex 3 makes this kind of app so darn simple to put together.
RegExr is built with Flex 3, and uses ActionScript 3’s built in RegExp engine. As with most engines, the AS3 RegExp implementation isn’t perfect, so you are likely to encounter some limitations and oddities. Likewise, RegExr is very much beta software (did I mention it was developed in a day?), and currently has no error handling whatsoever, so it’ll probably have a few quirks of its own.
RegExr uses an extension of the TextHilighter class that comes with the Spelling Plus Library. We will be including the RegExpHighlighter class with a future release of SPL.
If you encounter any issues using RegExr, would like to request a feature, or have a snippet you’d like to see added to the snippets pane, leave a comment below.
Here’s a quick screen shot of RegExr in action.
The latest version of RegExr will always have a permanent home at: gskinner.com/RegExr/. Flash Player 9 is required. I hope this is useful to people!
Update Mar 27, 08:
0.1.2b is online. Please click here to read about the update.
Update Mar 31, 08:
0.1.4b is online, and the desktop version of RegExr is now available. Please click here to read about the desktop version.
Update Mar 31, 08 (2):
0.1.5b is online, with support for replace functionality.
Update Apr 1, 08:
0.2.0b is online. I wrote a simple RegEx lexer for this version, so it understands your expressions at the token level. It still has a couple of minor quirks (character ranges with escaped characters is the main known issue [\x41-\x48] ).
Update Apr 2, 08:
0.2.1b is online. It addresses issues with character ranges and escaped characters, and includes some minor UI tweaks. Click here for more info.
Update May 26, 09:
0.3b is online. It allows you to save, share, search, and rate patterns. Click here for more info.