1 QuestHelper_File
["collect_patterns.lua"] = "Development Version"
2 QuestHelper_Loadtime
["collect_patterns.lua"] = GetTime()
6 function MakePattern(label
, newpat
)
7 if not newpat
then newpat
= ".*" end
8 if not patterns
[label
] then patterns
[label
] = "^" .. string.gsub(_G
[label
], "%%s", newpat
) .. "$" end
11 function MakeNumberSnag(label
)
12 if not patterns
[label
] then patterns
[label
] = string.gsub(_G
[label
], "%%d", "([0-9,.]+)") end
15 function QH_Collect_Patterns_Init(QHCData
, API
)
16 API
.Patterns
= patterns
17 API
.Patterns_Register
= MakePattern
18 API
.Patterns_RegisterNumber
= MakeNumberSnag