\t a tab character
\n a newline character
\r a carriage-r eturn character
\s matches any “whitespace” character (space, tab, newline, formfeed, and such)
\S anything not !\s"
\w ![a-zA-Z0-9R]" (useful as in !\w+" , ostensibly to match a word)
\W anything not !\w" , i.e., ![ˆa-zA-Z0-9R]"
\d ![0-9]" , i.e., a digit
\n a newline character
\r a carriage-r eturn character
\s matches any “whitespace” character (space, tab, newline, formfeed, and such)
\S anything not !\s"
\w ![a-zA-Z0-9R]" (useful as in !\w+" , ostensibly to match a word)
\W anything not !\w" , i.e., ![ˆa-zA-Z0-9R]"
\d ![0-9]" , i.e., a digit
\D anything not !\d" , i.e., ![ˆ0-9]"
*********************************************************
mastering regular expressions (third edtion)读书笔记