AOP – New languages or not? Rickard’s AOP Mixins
Oct 24

Regex Coach

Tech Add comments

I am a big fan of regular expressions, probably partly due to my work with Perl in the past ;) I was pointed to “The Regex Coach”, which is:

“… a graphical application for Linux and Windows which can be used to experiment with (Perl-compatible) regular expressions interactively. It 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. ”

It is one of those tools that just works, and does what it says on the can. If you get into any knarly regex, this can help you out.

Download The Regex Coach

Interesting Technical Info

“The Regex Coach is written in Common Lisp and was developed using the LispsWorks development environment by Xanalys. The regex engine used is CL-PPCRE.
It might be worthwhile to note that due to the dynamic nature of Lisp The Regex Coach could be written without changing a single line of code in the CL-PPCRE engine itself although the application has to track information and query the engine while the regular expressions is parsed and the scanners are built. All this could be done ‘after the fact’ by using facilities like defadvice and :around methods. Imagine writing this application in Perl without touching Perl’s regex engine… :)

Also, thanks to Lispwork’s cross-platform CAPI toolkit the code for the Windows and Linux versions is nearly identical without any platform-specific parts (except for some lines regarding different fonts and keybindings).”

Very interesting stuff. defadvice and :around… remind anyone of anything? :) (AOP isn’t a new thing!)

Comments are closed.