6.6 Mastering Regular Expressions with the Regulator

Regular expressions are among the most mysterious and black-art-like technologies for developers. Mastering them can yield amazing results and productivity gains, but they’re hard to learn, and regex syntax is often very cryptic.

Using regular expressions in your applications is often not as trivial a task as you would like, because you need to make sure the expressions actually work and do what you expect them to. This testing is usually done manually, and cycling between developing the expression in your language of choice, compiling a test harness, and running it to check the expression’s operation can take up a significant amount of time.

The Regulator, built by Roy Osherove, is designed to eliminate (or at least reduce) this time-stealing phase. The Regulator allows you to create your regular expressions in an environment similar to an IDE. Among other things, it allows:

  • Previewing the results of running your expression on a specific set of inputs

  • Syntax highlighting in the regex editing pane

  • Searching for common expressions online using RegExLib.com’s web services from within an application

  • Importing expressions that you find suitable into your editing pane


You can read more about regular expressions in the article “Introduction to Regular Expressions,” also by Roy Osherove, which you can find online at http://dotnetweblogs.com/rosherove/story/6863.aspx.

The Regulator at a Glance


The Regulator

Version covered


Home page ...

Get Windows Developer Power Tools now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.