Mega Code Archive

 
Categories / Perl / Regular Expression
 

Regular expression character patterns

SEQUENCE     PURPOSE \w           Matches an alphanumeric character. Alphanumeric includes '_'. \W           Matches a nonalphanumeric character. \s           Matches a whitespace character. This includes spaces and tabs. \S           Matches a nonwhitespace character. \d           Matches a digit. \D           Matches a nondigit character. \b           Matches a word boundary. \B           Matches a nonword boundary. \A           Matches only at beginning of string. \Z           Matches only at end of string. \G           Matches only where previous m//g left off.