Character Class: Whitespace Characters : Character Class « Regular Expression « Perl






Character Class: Whitespace Characters

    

Metacharacter               What It Matches
\s                          Matches a whitespace character, such as spaces, tabs, and newlines
\S                          Matches nonwhitespace character
\n                          Matches a newline
\r                          Matches a return
\t                          Matches a tab
\f                          Matches a form feed
\b                          Matches a backspace
\0                          Matches a null character

   
    
    
    
  








Related examples in the same category

1.Character Class: Alternative Characters
2.Character Class: Anchored Characters
3.Character Class: Miscellaneous Characters
4.Character Class: Remembered Characters
5.Character Class: Repeated Characters
6.Match any number of alphanumerics followed by a single space character
7.Match at least one alphanumeric followed by a single space character
8.Posix and Unicode Classes
9.The bracket metacharacters and negation
10.The bracketed character class