Like most other high-level or scripting languages, a backslash paired with another single character indicates the presence of a “special” character, usually a non-printable character, and that this pair of characters will be substituted by the special character. These are the special characters we discussed above that will not be interpreted if the raw string operator precedes a string containing these characters.
In addition to the well-known characters such as NEWLINE ( ) and (horizontal) TAB ( ), specific characters via their ASCII values may be used as well: OOO or xXX where OOO and XX are their respective octal and hexadecimal ASCII values. Here are the base 10, 8, and 16 representations of 0, 65, and 255:
ASCII | ASCII | ASCII | |
---|---|---|---|
decimal | 0 | 65 | 255 |
octal |