Escaped Sequences in Regular Expressions

Qedit 5.7 for HP-UX

Home Previous Next


Escaped Sequences in Regular Expressions

The escape character can be combined with other characters to represent nonprinting characters. Qedit recognizes the following escaped characters: (These should not be confused with escape sequences that control the display on HP-type terminals. They are also not metacharacters.)

\b Backspace
\e ASCII escape character (ESC)
\f Form feed
\n New line (line feed)
\r Carriage return
\s Space
\t Horizontal tab
\DDD 1-3 octal digits representing a character's ASCII value
\xDDD 1-3 hex digits representing a character's ASCII value
\^C Control code (e.g., Control-G (^G) is the Bell character)

For example, you would use:

\t          {all lines with a tab character}
\e&d@&      {terminal escape sequence ESC&d@}

Escaped characters can be used anywhere an ordinary character is used, including a character class and to declare a character range.


Home Previous Next