Special characters Flashcards
.
matches any single character except line terminators
\d
matches any digit === [0-9]
\D
matches any non digit
\w
matches any alphanumeric character from basic latin alphabet including underscore
\W
matches any character that is not a word character from the basic latin alphabet
\s
matches a single white space character
\S
matches a single character other than white space
\t
matches a horizontal tab
\r
matches a carriage return
\n
matches a linefeed
\v
matches a vertical tab
\f
matches a form-feed
[\b]
matches a backspace
\0
matches a NUL character
\cX
where X is a letter from A-Z, matches a control character in a string
\xhh
matches the character with code hh(two hexadecimal digits)
\uhhhh
matches a UTF-16 code-unit with the value hhhh(four hexadecimal digits)
\
indicates that the next character is special and not to be interpreted literally