Fixed "regex escape" function, and updated a script that needed it.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@762 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2007-09-30 14:37:18 +00:00
parent 01dbd8cb7b
commit dd656ba1bd
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
mse version: 0.3.5
mse version: 0.3.5
short name: Magic
full name: Magic the Gathering
icon: card-back.png
@@ -112,7 +112,7 @@ init script:
text_to_color := {
# Note: running filter_text is quite slow, do a quick 'contains' check first
if contains(match: card_name) then (
text := filter_text(match: card_name+"(</[-a-z]+>)? is (colorless|all colors|((blue|white|green|red|black)((,|,? and) (blue|white|green|red|black))*))\\.")
text := filter_text(match: regex_escape(card_name)+"(</[-a-z]+>)? is (colorless|all colors|((blue|white|green|red|black)((,|,? and) (blue|white|green|red|black))*))\\.")
if text != "" then (
if contains(text, match: "all colors") then (
colors := "WUBRG"