Application icon

Regular Expression Replace Template Format

Note that in addition to the standard metacharacters described in the table, Yate supports \V# and \<named variable> sequences via a prescan to insert the contents of a Variable or named variable. The inserted contents can be treated as literal characters or can be escaped to ensure that they do not interfere with any of the standard sequences.

The replacement text may contain references to capture-groups found when matching.


SequenceDescriptions
$nThe text of capture group n will be substituted for $n. n must be >= 0 and not greater than the number of capture groups. A $ not followed by a digit or { has no special meaning, and will appear in the substitution text as itself, a $.
${name}Matches a named capture group. This sequence is only valid on macOS 10.13 or greater.
${n}n must be >= 0 and not greater than the number of capture groups. This is the same as the $n mode. This sequence is useful for disambiguation purposes if numeric text can come after the capture group. eg. ${1}123 will insert 123 after capture group 1. $1123 will not work.
\Treat the following character as a literal, suppressing any special meaning. Backslash escaping in substitution text is only required for '$' and '\', but may be used on any other character without bad effects.

Note that Yate supplies extensions to the template format.



Regular Expression Metacharacters

Regular Expression Operators

Regular Expression Flag Options

Yate Regular Expression Extensions