Translate

Friday, January 25, 2013

Regular Expression Tester

I "regularly"  (nyuk nyuk!) use regular expressions in my .Net code.  However, I find that I spend no small amount of time designing them, troubleshooting why they aren't working and trying to work out the escape characters correctly.  So much so that I decided to write a Regex testing application.

Regex Tester (zipped .exe)

C# Source Code

This tool allows me to rapidly test regular expressions against sample text with or without options.


It shows me matches, splits and replaced text.

If the Regex phrase is invalid, it will display the error text:



When I'm satisfied with the phrase and options, I click Copy Regex Initializer to copy it to the clipboard:


I can paste the copied text directly into my code after declaring the Regex object:

I hope you find it useful.


No comments: