From 4b7afdd8dae2afbab979cd1c73c58a296cc0eb98 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 27 Apr 2024 20:22:15 -0400 Subject: [PATCH] docs: Generate the docs for %regex_sub script function --- .../config_reference/scripting/scripting_functions.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/source/config_reference/scripting/scripting_functions.rst b/docs/source/config_reference/scripting/scripting_functions.rst index db773b17..d5948fb5 100644 --- a/docs/source/config_reference/scripting/scripting_functions.rst +++ b/docs/source/config_reference/scripting/scripting_functions.rst @@ -560,6 +560,15 @@ regex_search the string as the first element of the Array. If there are capture groups, returns each group as a subsequent element in the Array. +regex_sub +~~~~~~~~~ +:spec: ``regex_sub(regex: String, replacement: String, string: String) -> String`` + +:description: + Returns the string obtained by replacing the leftmost non-overlapping occurrences of the + pattern in string by the replacement string. The replacement string can reference the + match groups via backslash escapes. Callables as replacement argument are not supported. + ---------------------------------------------------------------------------------------------------- String Functions