Non printing character
There are many useful non printing characters that must be used occasionally. The following table shows the escape sequences used to represent these non printed characters:
character | meaning |
---|---|
\cx | Match byxThe specified control character. For example, \ cm matches a control-m or carriage return.xThe value of must be either A-Z or one of A-Z. Otherwise, C is treated as a literal ‘C’ character. |
\f | Match a page feed. Equivalent to \ x0c and \ CL. |
\n | Match a newline character. Equivalent to \ x0a and \ CJ. |
\r | Match a carriage return. Equivalent to \ x0d and \ cm. |
\s | Matches any white space characters, including spaces, tabs, page breaks, and so on. Equivalent to [\ f \ n \ R \ t \ v]. |
\S | Matches any non whitespace characters. Equivalent to [^ \ f \ n \ R \ t \ v]. |
\t | Match a tab. Equivalent to \ X09 and \ CI. |
\v | Match a vertical tab. Equivalent to \ x0B and \ CK. |