Search This Blog

Tuesday, July 21, 2015

Valuable Tools When Working With Regular Expressions

Update: This tool works well for testing Javascript's Regular Expression implementation. 
Check here for a list of tools for other implementations.

I am posting here links to some highly valuable tools I found for when you are working with regular expressions:

One is a playground/tester where you can literally play with regular expressions, in an extremely user-friendly manner.

The other is a tool for generating string samples based on a regular expression input. This is very handy when need to deal with all sorts of complex regular expressions you did not create, and you are trying to test if they are working or not. (Ex: when testing .xsd schema validations).

The playground/tester is located at http://www.regexr.com.

Features I like the most:
  1. You can hover over any part of the expression and get its meaning/understand what it does - on the fly.
  2. You can save whatever expression you have been playing with, and share them.
  3. It contains a summarized yet easy-to-understand reference for regular expression syntax components.
  4. You can type as many test strings you want, and it automatically highlights every match. It also colors every syntax component, making it easy to identify them in the pattern.
It has been really very handy. Thanks to the developer team for making it available for public use!

The samples generator resides at http://uttool.com/text/regexstr/default.aspx.

If you are interested in a C# implementation of such string samples generator, https://github.com/moodmosaic/Fare can be useful.

There is also a generator from microsoftRex

Regexplained offers a visual explanation of the regular expression. Try it!

No comments:

Post a Comment