From ca55a4d5da48997db54f0301487d85e0162a6654 Mon Sep 17 00:00:00 2001 From: twanvl Date: Fri, 24 Aug 2007 20:46:56 +0000 Subject: [PATCH] Added regex_escape script function (was already used by keyword code); Added icons for 'sort special rarity' choice. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@626 0fc631ac-6414-0410-93d0-97cfa31319b6 --- doc/function/regex_escape.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/function/regex_escape.txt 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\\)"