Thursday, September 9, 2004

The Regex Coach - interactive regular expressions

Having problems with regex expressions? Then try this amazing tool The Regex Coach. It is a graphical application for Linux and Windows which can be used to experiment with (Perl-compatible) regular expressions interactively.



The Regex Coach has the following features:

  • It shows whether a regular expression matches a particular target string.

  • It can also show which parts of the target string correspond to captured register groups or to arbitrary parts of the regular expression.

  • It can 'walk' through the target string one match at a time.

  • It can simulate Perl's split and s/// (substitution) operators.

  • It tries to describe the regular expression in plain English.

  • It can show a graphical representation of the regular expression's parse tree.

  • It can single-step through the matching process as performed by the regex engine.

  • Everything happens in 'real time', i.e. as soon as you make a change somewhere in the application all other parts are instantly updated.
If you want to experiment with some regex expressions using this tool, try the Regular Expression Library. The library has categorized expressions for Email, Uri, numbers, strings, markup code, dates/times, address/phone and more.



Thanks to Mark Cunningham (Mark's Virtual Playground) for his post in the Html-Kit newsgroups on this. Nice find Mark!

No comments:

Post a Comment