Metacharacters for Single Characters : Metacharacters « Regular Expression « Perl






Metacharacters for Single Characters

    
Metacharacter               What It Matches
.                           Matches any character except a newline
[a-z0-9_]                   Matches any single character in set
[^a-z0-9_]                  Matches any single character not in set
\d                          Matches a single digit
\D                          Matches a single nondigit; same as [^0-9]
\w                          Matches a single alphanumeric (word) character; same as [a-z0-9_]
\W                          Matches a single nonalphanumeric (nonword) character; same as [^a-z0-9_]

   
    
    
    
  








Related examples in the same category

1.Meta-Character ASCII Values
2.Meta-Characters listing
3.Metacharacters and metasymbols
4.Metacharacters that Turn off Greediness
5..* special-character combination tries to match as much as possible
6.The dot metacharacter
7.The dot metacharacter and the zero or more quantifier
8.Some Regular Expression Metacharacters