Escaped Characters in Replacement String

Qedit 5.7 for HP-UX

Home Previous Next


Escaped Characters in Replacement String

Escaped sequences can also be used in the replacement string of a Change command, making it easier to insert special characters.

All escaped sequences are valid in the replacement, except for octal values (these are coded using octal digits). For example, "\007" can be used to represent the bell character. However, backreferences in the replacement string are represented by \n, where n is a digit from 0 to 9. Because of that, \007 might be interpreted as backreference \0 followed by the literal 07 (bell character).

To work around this limitation, a backslash followed by a digit in a replacement string is always assumed to be a backreference. To specify special characters using numeric values, you should use hexadecimal notation (e.g., \x007).


Home Previous Next