diff --git a/doc/function/regex_escape.txt b/doc/function/regex_escape.txt new file mode 100644 index 00000000..9f70e380 --- /dev/null +++ b/doc/function/regex_escape.txt @@ -0,0 +1,14 @@ +Function: regex_escape + +--Usage-- +> regex_escape(some_string) + +Escape a string so it can safely be used in a [[type:regex|regular expression]]. +The regular expression will match the literal string, and nothing else. + +--Parameters-- +! Parameter Type Description +| @input@ [[type:string]] String to escape. + +--Examples-- +> regex_escape("some(thing)") == "some\\(thing\\)"