Search Appliance SBE
When replacing the match of a REX/RE2 expression, the replacement string has the following syntax:
?#{}+\
" are special.
To use them literally, precede them with the escapement character
"\
'.?
'. The ditto character will
copy the character from the search buffer that is in the same
position as the ditto character is in the replacement string.{5}
)
will copy the character at that index (of the search buffer)
to the output. Characters are indexed starting at 1.
An index beyond the end of the search buffer will not print anything.\
" followed by a decimal number will copy that
subexpression (REX) or parenthetical numbered capturing group (RE2)
to the output. Subexpressions and groups are numbered starting at 1.
Named groups (RE2) are not currently supported.
See here for more on RE2.\&
" will copy the entire expression match
(sans \P
and \F
portions, if REX syntax) to the output.
This escape was added in Texis version 7.06.+
" will place an incrementing decimal number
to the output. One purpose of this operator is to number lines.#
" followed by a number will cause the numbered
subexpression (REX) or parenthetical numbered capturing group (RE2)
to be printed in hexadecimal form. Subexpressions and groups are
numbered starting at 1. Named groups (RE2) are not currently
supported.\x
hh where hh is the hexadecimal value.