Visual Studio 2010 Gallery - RegEx Editor

VS2010Gallery

Regular expressions provide a concise and flexible means for identifying strings of text, such as particular characters, words, or patterns of characters.  A regular expression  is a special text string for describing a search pattern.

For example, the following RegEx will validate a USA telephone number with the format of "1-NNN-NNN-NNNN"

"^1?\s*-?\s*(\d{3}|\(\s*\d{3}\s*\))\s*-?\s*\d{3}\s*-?\s*\d{4}$"

So, in this example, a value of "1-800-555-1212" will pass; "555-1212" will fail.

Now, you can the ability to develop and test your Regex expressions INSIDE Visual Studio 2010. It’s and one of the many, many awesome extensions provided for our latest IDE.  Here is a screen shot of the editor:

Dev10RegEx

This sample was built to ease your pain when working with regular expressions.  It rehosts the editor in a dialog box and provides a basic language service to provide colorization, brace matching, sample testing grouping and selection tracking.  It shows re-hosting of the editor in a tool window, and provides a nice starting point for similar projects.

Check it out at: https://visualstudiogallery.msdn.microsoft.com/en-us/55c24bf1-2636-4f94-831d-28db8505ce00

Technorati Tags: Visual Studio 2010

kick it on DotNetKicks.com Shout it