Help with Regular Expressions

Regular expressions are a very powerful tool in any programmers toolset.

Unfortunately I have always had a difficult time creating and testing them.

Recently a co-worker told me about a tool he has been using the Expresso Regular Expression Development Tool.

This is a fantastic tool to aid the developer in creating, testing and saving regular expressions.

 

Published Tuesday, January 13, 2009 12:49 PM by dmccollough

Comments

# re: Help with Regular Expressions

Tuesday, January 13, 2009 3:34 PM by Brad C.

I have tried out Espresso, but it was not until I started using RegexBuddy that I started using Regular Expressions more often.

I did have some troubles with running RegexBuddy in Vista, but it appears as though the recent upgrade has fixed the problem.

Espresso's price is better, but I think the 30.00 or so I spent on RegexBuddy is pretty good.

# re: Help with Regular Expressions

Tuesday, January 13, 2009 6:57 PM by SGWellens

It's also nice in that it adds documenation to the code it generates:

/// <summary>

///  A description of the regular expression:

///  

///  [Zip]: A named capture group. [\d{5}]

///      Any digit, exactly 5 repetitions

///  -

///  [Sub]: A named capture group. [\d{4}]

///      Any digit, exactly 4 repetitions

///  

///

/// </summary>

public static Regex regex = new Regex(

     "(?<Zip>\\d{5})-(?<Sub>\\d{4})",

   RegexOptions.IgnoreCase

   | RegexOptions.CultureInvariant

   | RegexOptions.IgnorePatternWhitespace

   | RegexOptions.Compiled

   );

# re: Help with Regular Expressions

Wednesday, January 14, 2009 3:23 AM by alexandershapovalov

Have a look at Komodo regular expression, I used it while learned it. It's very good, but also costs money.