You are on page 1of 9

Regular Expressions in ASP.

NET

Page 1 of 9

ASP.NET Technical Articles

Regular Expressions in ASP.NET
A Crash Course Steven A. Smith March 2004 Applies to: Microsoft® .NET Framework Microsoft® ASP.NET Regular Expression API Summary: Regular expressions are an extremely useful tool for working with text. Whether you need to validate user input, search for patterns within strings, or reformat text in powerful ways, regular expressions can help. (14 printed pages) Download the source code for this article. Contents Introduction Brief History of Regular Expressions Simple Expressions Quantifiers Metacharacters Character Classes Predefined Set Metacharacters Sample Expressions Validation in ASP.NET Regular Expression API Free Tools Advanced Topics Conclusion Resources About the Author

Introduction
Support for regular expressions in the Microsoft®.NET Framework is first-class, and even just within Microsoft® ASP.NET there are controls that rely on the language of regular expressions. This article covers the basics and recommends where to go to learn more. This article is designed for beginners with little or no experience with regular expressions, but who are familiar with ASP.NET and programming in .NET. I hope it will also make a handy reference/refresher for developers who have used regular expressions before, in conjunction with my regular expression cheat sheet. In this article, I will discuss: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Brief History of Regular Expressions Simple Expressions Quantifiers Metacharacters Character Classes Predefined Set Metacharacters Sample Expressions In Detail Validation in ASP.NET Regular Expression API Free Tools Advanced Topics Overview

ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEV.v10.en/dnaspp/html/regexnet.... 11/4/2010

and thus a regular expression pattern like foo would match the input string foo exactly once. Brief History of Regular Expressions Regular expressions as they exist today were invented in the 1950s. foe.com. *. Credit for the first regular expressions is given to the mathematician Stephen Kleene. and any matches the pattern makes within the string. both very popular text utilities. Using regular expressions in Microsoft® Visual Basic® 6 or Microsoft® VBScript was awkward at best. funny.RegularExpressions classes). Eventually. foe.v80/MS. food. They provide a powerful and usually very succinct way to solve many common tasks related to text manipulation. Ken Thompson built support for regular expressions into qed and grep. foot. literally. foot. While regular expressions were supported by many UNIX tools for decades. to parse strings into substrings using patterns as delimiters. fooot. which describes "0 or 1 occurrence". Pattern foo Inputs (Matches) foo. A particular string can be described. In the last five decades. I invite you to ask them on the regex mailing list at http://aspadvice. In this case." Quantifiers Quantifiers provide a simple way to specify within a pattern how many times a particular character or set of characters is allowed to repeat itself. it would also match the input: The food was quite tasty. foe.. regular expression engines can typically be used to iterate through matches.MSDN. So just what are regular expressions? Regular expressions are a language that can be used to explicitly describe patterns within strings of text. Of course. food.. Below are some sample patterns and inputs they would match.Text. food. funny. "forget it" foo. Pattern fo* fo+ fo? Inputs (Matches) foo. "forget it".NET Framework. Summary and Additional Resources If you have questions about this article or regular expressions in general. puffy In addition to specifying that a given pattern may occur exactly 0 or 1 time. regular expression support is top-notch and available to all Microsoft developers and all . "forget it". "There's evil afoot. matching exact strings to themselves is a trivial implementation of regular expressions.Regular Expressions in ASP.NET Page 2 of 9 12." which were patterns under study by neurophysiologists.NETDEV. which is normally a single character unless parentheses are used to create a pattern group. which describes "1 or more occurrences". the input string.v80/MS. In addition to simply describing such patterns. What if instead of foo you wanted to find all words starting with the letter f.en/dnaspp/html/regexnet. puffy foo. which as I'm writing this has over 350 subscribers.VSCC. regular expressions have slowly made their way from mathematic obscurity to a staple feature of many tools and software packages. and doesn't begin to reveal their power. 3. In this article (and in the System. we'll refer to three players in the regular expression interaction: the regular expression pattern. foot. but with the introduction of the . Simple Expressions The simplest regular expression is one you're already familiar with—the literal string. or all three letter words? Now you've gone beyond what literal strings can do (within reason)—it's time to learn some more about regular expressions.. or to replace or reformat text in an intelligent fashion. which is strongly recommended for those wishing to learn more about the theory and history behind regular expressions. There are three non-explicit quantifiers: 1. the ? character also forces a pattern or subpattern to ms-help://MS. 11/4/2010 . 2. and ?. Below is a sample literal expression and some inputs it would match. Regular expressions were originally used to describe "regular sets. food. Mastering Regular Expressions (2 nd edition). which might be not be desired if only a precise match is sought. Jeffrey Friedl goes into more depth in his book.NET languages. which describes "0 or more occurrences". Quantifiers always refer to the pattern immediately preceding (to the left of) the quantifier. it was only in the last decade or so that they have found their way into most Windows developers' toolkits.v10. It is common when discussing regular expressions to analyze them based on text they would or would not match. +. by itself.

For example.. it is used as the upper bound unless it is followed by a comma. So for instance if you wanted to match strings that begin with "c:\" you might use this: ^c:\\ Note that we used the ^ metacharacter to indicate that the string must begin with this pattern. ?. The ^ metacharacter is used to designate the beginning of a string (or line). . for readability only. Some examples of metacharacter usage are listed below. but must fall within certain length ranges by using quantifiers. you can force it to only match input strings that exactly match the pattern.Regular Expressions in ASP. such as x{5.VSCC. x{5} would match exactly five x characters (xxxxx). explicit quantifiers allow an exact number. You've already learned about several metacharacters. So something like a|b would match anything with an 'a' or a 'b' in it. b. c:\foo. there are also explicit quantifiers. or to allow certain portions of the input to be matched separately. When used in an expression. abcabcabc Character Classes Character classes are a mini-language within regular expressions. such as [aeiou].NETDEV.v80/MS. any string. 123. such as ensuring the user entered something that is the proper format for a postal code or telephone number. 123abc. perhaps to allow for reformatting or parsing.}. [ ( | ) ] and \. essentially to specify 'this OR that' within a pattern. The | (pipe) metacharacter is used for alternation. These include the following: $ ^ . The \ (backslash) metacharacter is used to "escape" characters from their special meaning. Also. range. designated by hard braces [ ]. any one of these characters ms-help://MS. (period or dot) metacharacter is one of the simplest and most used.* ^c:\\ abc$ (abc){2. Several other characters have special meaning within the language of regular expressions. This can be useful for specifying that certain patterns can contain any combination of characters. c:\ followed by anything else abc. It matches any single character. Pattern . which would match any number of x characters greater than 4. defined by the enclosing hard braces [ ]. The ^ metacharacter also has special meaning when used at the start of a character class. but what if you only want to match the pattern exactly? This is often the case for validation scenarios. c. Where quantifiers are fairly vague in terms of how many occurrences there may be of a pattern.v80/MS. 11/4/2010 . abbbc.3}c Inputs (Matches) abbc. abc. 3 Abc. just like regular quantifiers. Explicit quantifiers are positioned following the pattern they apply to. Below are some sample patterns and inputs they would match.v10. Finally. These too are covered below. aabbcc. In order to include a literal version of a metacharacter in a regular expression. the parentheses ( ) are used to group patterns. such as the *. aabbbcc Metacharacters The constructs within regular expressions that have special meaning are referred to as metacharacters. it must be "escaped" with a backslash. and { } characters. even no characters would match c:\windows.MSDN. 2. The simplest character class is simply a list of characters within these braces. and the $ metacharacter is used to designate the end of a string (or line). This can be done to allow a complete pattern to occur multiple times using quantifiers. we have seen that expressions will match any instance of the pattern they describe within a larger string. but I'm distinguishing them from this next group).. c:\\\\\.3} Inputs (Matches) a.2}c ab{2.en/dnaspp/html/regexnet.NET Page 3 of 9 match the minimal number of characters when it might match several in an input string.. and we escaped our literal backslash with a backslash metacharacter. +. Explicit quantifiers use curly braces {} and number values for upper and lower occurrence limits within the braces. In addition to the non-explicit quantifiers (generally just referred to as quantifiers. or set of numbers to be specified. and would be very similar to the character class [ab]. abbc. any string ending with abc abcabc. Pattern ab{2}c ab{. When only one number is specified.txt. aaabbccc ac. aabbcc abbc. By adding these characters to the beginning and end of a pattern. The . as well as to designate instances of predefined set metacharacters. These are covered below. 1.

such as \u000D which would match the Unicode carriage return character.v80/MS. Different implementations of regular expressions define different sets of predefined metacharacters—the ones I describe here are supported by the System. To specify any numeric digit. so the order in which the characters occur in the (for example) ASCII or Unicode table determines which characters are included in the range. or for any uppercase letter [A-Z]. To specify any numeric digit using a hyphen.) In in the next version of the . Pattern ^b[aeiou]t$ ^[0-9]{5}$ ^c:\\ abc$ (abc){2. you could use [a-z]. only single characters. c:\ followed by anything else abc. not within regular expressions (thus it doesn't qualify as a regular expression metacharacter. any string ending with abc abcabc. you could use a character class of [^aAeEiIoOuU]. the regular expression metacharacters are not treated special within character classes. The syntax would be something like [a-z-[aeiou]] to match all lowercase consonants. ranges of characters can be defined within the braces by using the hyphen character. c:\\\\\. To ease the pain of dealing with these common but lengthy patterns. code-named "Whidbey". The range defined by the hyphen depends on the character set being used. it should be the second character in the character class. \u0009 Matches a carriage return.com/team/clr/bcl/TechArticles/techarticles/Specs/Regex/CharacterClassSubtraction. If you need a hyphen to be included in your range. -1. which must specify the address of the character they are matching. abcabcabc 0. \u000D ms-help://MS. where it matches a backspace character.Regular Expressions in ASP.. bot. to match any non-vowel character. It's important to note that character classes cannot be used to define words or patterns. and it only has special meaning within a character class if it is not the first character. since this would quickly get cumbersome. specify it as the first character. 11/4/2010 . 123abc. making them easy to use and an ideal replacement for lengthy character classes.MSDN.doc. The exceptions are specific character code matches. which would provide a more readable way to describe some patterns. The specification is available now. For example. Most of these are just one character long. -.gotdotnet. a new feature is slated to be added to character classes. Metacharacter \a \b Equivalent Character Class Matches a bell (alarm).NET Framework.? ] would match any one of those four characters (note the last character is a space).RegularExpressions API in the .en/dnaspp/html/regexnet. The hyphen character has special meaning within character classes. Similarly for any lowercase letter.. Consider character classes to be a separate language from the rest of the regular expression world.v10.Text.NET Framework. so they do not need escaped. at http://www. Thus.txt. -2. etc. … (will not match -0. or worse. with their own rules and syntax. 12345. called character class subtraction. the character class [0123456789] could be used. \u0007 Matches a word boundary except in a character class. [0-9a-zA-Z] for any alphanumeric character. Some of the most common character classes and their metacharacter equivalents are listed below. it is still rather longwinded to use [0-9] for every numeric digit in a pattern. Two such examples are \d which matches any numeric digit and \w which matches any word character (alphanumeric plus underscore). However. exactly). Note that if you want to negate a hyphen. Remember that the ^ has a totally different meaning within a character class than it has at the start of a regular expression pattern. [-. Predefined Set Metacharacters There's a great deal that can be done with the tools we've covered so far.NET Page 4 of 9 can be used at this position in the pattern (but only one unless quantifiers are used). you would use [0-9].. Also note.v80/MS. 99999 c:\windows. c:\foo. However. but 11111. \u0008 \t \r Matches a tab.NETDEV. bet. Some examples of character classes in action are listed below. Basically this would allow one character class to be subtracted from another. The standard syntax for these predefined metacharacters is a backslash \ followed by one or more characters. You can also match any character except a member of a character class by negating the class using the carat ^ as the first character in the character class. as in [^-].VSCC. 1.3} ^[^-][0-9]$ Inputs (Matches) Bat. 2. a set of predefined metacharacters was defined. bit.

11/4/2010 . Pattern ^\d{5}$ ^(\d{5})|(\d{5}-\d{4}$ Description 5 numeric digits. Matches any word character. Equivalent to the Unicode character classes [\f\n\r\t\v\x85 \p{Z}].NETDEV.represents a space.com. \s Matches any white-space character. \S Matches any non-white-space character. Matches a Unicode character using exactly four hexadecimal digits.. In Unicode categories. Supported names are Unicode groups and block ranges. not the * metacharacter). such as a US ZIP code. rather than requiring two separate patterns to be compared individually (via alternation). ECMAScript behavior. This matches a US ZIP or US ZIP+4 format.MSDN. Same as above. In this case \u0020 is a space. Equivalent to [\p{Nd}] for Unicode and [0-9] for non-Unicode. in this case ctrl-C. For example Ll. For more samples. \u000A Matches an escape.v80/MS. ms-help://MS. Matches an ASCII control character. Equivalent to the Unicode character categories [^\f\n\r\t\v\x85\p{Z}]. IsGreek. Uses ? to make the -4 digits portion of the pattern optional. you should visit the online regular expression library. ECMAScript behavior. this is the same as [\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p {Nd}\p{Pc}]. Matches an ASCII character using 2-digit hexadecimal. or 5 digits-dash-4 digits. but more efficient. \P{name} \w Matches text not included in the named character class 'name'. ^[+-]?\d+(\. this equals the ECMAScript compliant set [^a-zA-Z_0-9] or the Unicode character categories [^\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}]. Thus \* is the same as \x2A (a literal *. this is the same as [a-zA-Z_0-9]. Sample Expressions Most people learn best by example. For non-Unicode and ECMAScript implementations. 5 numeric digits. \* Any character that does not represent a predefined character class is simply treated as that character. \x2. \S is equivalent to [^ \f\n\r\t\v] (note space after ^). at http://RegexLib. ^(\d{5}(-\d{4})?$ Same as previous.. \d Matches any decimal digit. If ECMAScript-compliant behavior is specified with the ECMAScript option.?\d*$ ^(20|21|22|23|[01]\d)[0-5]\d$ Matches any real number with optional sign.. \W The negation of \w. \u001B Matches an ASCII character with a three-digit octal. \D Matches any non-decimal digit.VSCC. \p{name} Matches any character in the named character class 'name'.NET Page 5 of 9 \w \f \n \e \040 \x20 \cC \u0020 Matches a vertical tab. \040 represents a space (Decimal 32). Equivalent to [\P{Nd}] for Unicode and [^0-9] for non-Unicode.Regular Expressions in ASP.v10. In this case. If ECMAScript-compliant behavior is specified with the ECMAScript option.v80/MS. \s is equivalent to [ \f\n\r\t\v] (note leading space). \u000C Matches a new line. and Sc (currency). Nd. IsBoxDrawing. \u000B Matches a form feed.en/dnaspp/html/regexnet.\d+)?$ ^[+-]?\d*\. Z. so here are a very few sample expressions. Matches any 24-hour time value. but also matches empty string.

Returns an array of strings by splitting up the input string into array elements separated by regex matches. Replace Split Replaces matches in the input string with a given replacement string." ValidationExpression="(\d{5}(-\d{4})?" /> A few things to note about the RegularExpressionValidator: It will never be activated by an empty string in the control it is validating.VSCC.. One of the more powerful validators is the RegularExpressionValidator which. this simply modifies the behavior of ^ and $ so that they match BOL and EOL instead of the ms-help://MS..Regular Expressions in ASP. which make validating inputs on web forms extremely easy compared to the same task using legacy (or classic if you prefer) ASP.*\*/ Matches the contents of a C-style comment /* … */ Validation in ASP.RegularExpressions namespace. the main classes you'll want to become familiar with are Regex. Incidentally. and thus can be OR'd together (yes. you'll use the classes found in the System. Rather. Multiline Has nothing to do with how many lines are in the input string.NET ASP. Only the RequiredFieldValidator catches empty strings You do not need to specify beginning of string and end of string matching characters (^ and $)—they are assumed. Match. Returns a Match object if a match is found in the input string. either ensure your expression is ECMAScript compliant. so pick whichever sounds better to you. This saves the step of parsing the expression on each iteration.v80/MS. it will fail on the client. most of the time when you're using regular expressions in . you can have both Multiline and Singleline turned on at the same time). but there are experts in both pronunciation camps. Option Compiled Description Use this option when you will be doing many match operations in a loop. allows you to validate inputs by providing a regular expression which must match the input. regex.v10. In particular. 11/4/2010 . there is some dispute as to whether the shortened version of regular expression. as you might guess. usually in the constructor of the Regex object. A summary of the most frequently used methods is included here: Method Escape / Unescape IsMatch Match Matches Description Escapes metacharacters in a string for use as literals in an expression. An example validator for a ZIP code field is shown below: <asp:RegularExpressionValidator runat="server" id="ZipCodeValidator" ControlToValidate="ZipCodeTextBox" ErrorMessage="Invalid ZIP code format. If you add them. Returns a MatchCollection object containing any and all matches found in the input string. it won't hurt (or change) anything—it's simply unnecessary. The Regex class has a rich set of methods and properties. To avoid this.MSDN. there are also a number of options that can be specified. which can be rather daunting if you haven't used it before. should be pronounced /regeks/ or /rej-eks/. The regular expression pattern is specified by setting the ValidationExpression property of the control.NET validation controls. In addition to many methods.en/dnaspp/html/regexnet.NET..NETDEV.NET Page 6 of 9 /\*. Regular Expression API Outside of the ASP. Personally I prefer the latter. These options are part of a bitmask. Returns true if the regex finds a match in the input string.Text. and MatchCollection. format should be either 12345 or 12345-6789. If your regular expression is not ECMAScript compliant. As with all validation controls. or set the control to perform its validation only on the server.NET provides a suite of validation controls.v80/MS. the validation is done client-side as well as server side.

For example. and then retrieve the set of matches for that expression.Regular Expressions in ASP. (period) metacharacter to match any character.Matches(inputString). the static Replace() method can be used to replace matches with a particular string. MatchCollection mc = re. MatchesLabel.v80/MS. instead of any character except \n. Rather.sellsbrothers. System. it includes tight integration with RegexLib via web services and provides support for Match.Text.IsMatch(ZipTextBox.Text = matches.com/iserializable/regulator/) – A regular expression testing tool designed to run client-side. Split. matching. all you must do is create or find the right expression and apply it to your input string using the IsMatch() method of the Regex class.Index + ". To perform validation.IgnoreCase | RegexOptions..gotdotnet. the following function demonstrates how to use a regular expression to validate a ZIP code: private void ValidateZipButton_Click(object sender.NET Page 7 of 9 beginning and end of the entire input string.Replace(inputString. these can be accomplished using static methods of the Regex class. For example. without any need to instantiate the Regex class itself.aspx?SampleGuid=C712F2DFB026-4D58-8961-4EE2729D7322) – Eric Gunnerson's tool for creating.Text. will cause the .NET pages.EventArgs e) { String ZipRegex = @"^\d{5}$". foreach(Match match in matches) { MatchesLabel. Will generate C# and/or VB. and replacing..<br>".NET (http://www. ZipRegex)) { ResultLabel.ToString() + " at position " + match. Free Tools The Regulator (http://royo. IgnoreCase IgnorePatternWhitespace Causes the pattern to ignore case sensitivity when matching the search string.IgnorePatternWhitespace). if(Regex. RegexDesigner.Text). as simple ASP. setting options. you would use code like the following: Regex re = new Regex(pattern. Allows pattern to have as much white space as desired. SingleLine Has nothing to do with how many lines are in the input string.NETDEV. and also enables the use of in-pattern comments.0) (http://www. RegexOptions. Replace and more. Advanced Topics ms-help://MS. as this snippet demonstrates: String newText = Regex.com/tools/#regexd) – A powerful visual tool for helping you construct and test regular expressions. MatchExpressionTextBox. which is the default. Has "Examine-omatic" feature. 11/4/2010 . Finally. System. pattern.en/dnaspp/html/regexnet.Matches(SearchStringTextBox. In many cases.Text += "Found " + match. } } Similarly. Complete working versions of these samples are included in the download for this article. replacementText). In particular.Count. Regular Expression Workbench (v2.is-a-geek. you can iterate through a collection of matches in an input string using code like this: private void MatchButton_Click(object sender. using the (?# comment #) syntax.VSCC.ToString().NET code and compiled assembliles to help you integrate expressions into your applications.Text = "ZIP is invalid!".. and studying regular expressions.Text = "". to create an instance of Regex that ignores case and pattern white space.com/Community/UserSamples/Details.EventArgs e) { MatchCollection matches = Regex. } } Where you'll typically need to instantiate an instance of the Regex class is when you need to specify anything outside the default behavior. Some common things you may use regular expressions for include validating. testing.v10.v80/MS. } else { ResultLabel. allowing you to hover the mouse over a regex to decode its meaning. Includes performance analysis and syntax highlighting.Text = "ZIP is valid!".MSDN. MatchCountLabel.

v80/MS. iterate through its Matches collection. These constructs do not consume characters even though they may match them. Some patterns are impossible to describe without lookaround processing.regexadvice.microsoft. suppose you were given a date in string format of the form MM/DD/YYYY and you wanted it in the form DD-MM-YYYY. and must contain at least one digit. Since you'll only need these on rare occasions. Using named groups.asp ms-help://MS.. Another common use of backreferences is within matching expressions themselves.com/login.NET Page 8 of 9 Two regular expression features that really make me have to think are named groups and lookaround processing. Consider a password restriction where the password must be between 4 and 8 characters long.com/ Regular Expression Discussion List http://aspadvice.. 'cc' and is not the same as [a-z]{2} or [a-z][a-z] which are equivalent and would allow 'ab' or 'ac' or any other two-letter combination.microsoft.RegularExpressions namespace and specifically the Regex class found there.2}/(?<year>\d{4})\b". Specifically positive lookahead. 11/4/2010 .. This would require a fair amount of code and a fair amount of processing. This can be especially powerful when combined with the Replace method as a way of reformatting an input string by re-arranging the order and placement of the elements within the input string. You could do this by just testing \d for a match and using string operations to test the length. "${day}${month}-${year}").v80/MS.Replace(intput.aspx%3fl%3d68%26c% 3d16&l=68&c=16 Regular Expression Forums http://forums. as this expression demonstrates: ^(?=.VSCC. Syntax (?=…) (?!.) Description Positive Lookahead Negative Lookahead Positive Lookbehind Negative Lookbehind One example of where lookaround processing is necessary is password validation. parse each string. This will match 'aa'. but to do the whole thing in a regular expression requires lookahead.{4. Resources Regular Expression Library http://regexlib.NET Framework provides first-rate support for regular expressions in its System. especially ones in which the existence of one part of the pattern depends on the existence of a separate part. The syntax for each flavor of lookaround is described below.info/ .com/ Regular Expression Web Logs http://blogs.asp Jscript Regular Expression Syntax http://msdn. "Lookaround processing" refers to positive and negative lookahead and lookbehind capabilities supported by many regular expression engines.Regular Expressions in ASP. Luckily. You could use write an expression to capture the first format.com/library/en-us/script56/html/js56jsgrpregexpsyntax.Text.8}$ Conclusion Regular expressions provide a very powerful way to describe patterns in text. @"\b(?<month>\d{1.NETDEV. you could accomplish the same things like so: String MDYToDMY(String input) { return Regex. making them an excellent resource for string validation and manipulation. For example. 'bb'.com/library/en-us/cpref/html/frlrfSystemTextRegularExpressions.) (?<=…) (?<!.. } You can also refer to groups by number as well as by name.MSDN. coming up with the right regular expression is often the tough part. Backreferences allow an expression to remember things about parts of the input string it has already parsed and matched. Not all regular expression engines support all variations of lookaround processing.. by Jeffrey Friedl http://regex. and use string manipulation to build the replacement string. With named groups. The . Using the API is simple.com/ Mastering Regular Expressions (O'Reilly). you can name individual matching groups and then refer to these groups within the expression programmatically.*\d).aspx?ReturnUrl=%2fSignUp%2flist..2})/(?<day>\d{1. and there are many resources online where you can find expressions designed by others or get help with ones you are struggling to create.NET Regular Expression Reference http://msdn. I'll only briefly describe these topics here.en/dnaspp/html/regexnet.. In any event such references are collectively referred to as backreferences.regexadvice. regular expressions are highly reusable. such as this expression for finding repeated letters: [a-z]\1.v10.

Steve speaks at several conferences each year and is a member of the INETA speaker's bureau.NET-focused training company.VSCC. He is also the owner and head instructor for ASPSmith Ltd.NET MVP. All rights reserved.NET Developer's Cookbook and ASP. Steve can be reached at ssmith@aspalliance. as well as articles in MSDN and AspNetPRO magazines.info About the Author Steven A. 11/4/2010 .regular-expressions.MSDN.NET Page 9 of 9 Regular Expression Info http://www.NETDEV..NET By Example.com and DevAdvice. He has authored two books.v10. a .v80/MS.com. Smith.en/dnaspp/html/regexnet. is president and owner of ASPAlliance.. Send feedback to Microsoft © Microsoft Corporation. Steve has a Master's degree in Business Administration and a Bachelor of Science degree in Computer Science Engineering.com.Regular Expressions in ASP. the ASP. ms-help://MS. Microsoft ASP.v80/MS..