Mega Code Archive

 
Categories / ASP.Net Tutorial / Validation
 

Metacharacters for Matching Types of Characters

Character  Class       Description  .                     Matches any character except \n. [aeiou]               Matches any single character specified in the set. [^aeiou]              Matches any character not specified in the set. [3-7a-dA-D]           Matches any character specified in the specified ranges (in the example the ranges are 3¨C7, a¨Cd, A¨CD). \w                    Matches any word character; that is, any alphanumeric character or the underscore (_). \W                    Matches any nonword character. \s                    Matches any whitespace character (space, tab, form-feed, newline, carriage return, or vertical feed). \S                    Matches any nonwhitespace character. \d                    Matches any decimal character. \D                    Matches any nondecimal character.