Wednesday, October 7, 2009

2 greats tools to develop and test regular expressions

Regular expression are a very powerful tool that every developer should know, use, and I'd even dare say abuse. But just because they are useful doesn't mean they are easy to use and master. It can even be rather painful to develop and test them.

This is mostly due to the lack of good tools to help test regular expression. By lack I mean that there is not a lot, but there's two that I've found pretty useful and up to the task.

Expresso

Expresso is a very need piece of software that allow you create test, and debug your regular expression. It has everything one may want to work with regular expressions:

It has 3 differents tabs:
  • the first one regular expression testing
  • the second one is a regular expression designer
  • the last one is your regular expression library, which contains a set of commonly used regular expression, but also the history of regular expression you've used recently
 It can even generate C# code to use the regular expression you've designed. You can export to several languages ( C#, VB, C++)

All in all that the one I most often use.


Rubular

The second one is called Rubular and comes in the form of an online tool. It is much simpler and doesn't boast as much features as Expresso, but what it does it does well. If you just want a quick testing tool for your regular expression, without installing anything, then Rubular is what you want:


Quick & easy, straightforward and efficient.



Now where to find those. For Expresso, you can find it here, and for Rubular it's available at this address. I hope you find those tools useful.