Multiple Windower Plugins use a Wilcard syntax in them such as SpellCast (2.17), AutoExec (2.7) and ChatMon (1.5).
This powerful syntax lets you specify multiple things to match giving you high flexibility.
Each definition in the match string is seperated by a | unless its within a REGEX string.
valueA|valueB|valueC
Anything matching one of these values will return true to the logic check. In SpellCast, Spell=“Fire|Stone|Water” will match if you cast any of those spells, but will not match on Blizzard.
Wildcard is a term meaning “anything”. There are 2 normal wildcard characters, * and ?.
a ? signifies a single character may be 'anything'.
Take the following match for example:
m???e?
monkey will match, because onk match the first 3 ?'s, and y matches the last ?.
master will match, because ast match the first 3 ?'s, and r matches the last ?.
laster will not match, because the l does not match the m of the format string.
A * lets the test know any number of characters can be in between the 2 characters.
Take the following match for example:
m*d*
mandy will match because the an falls in between the m and d's *, the string as at least an m and d in it so it matches.
moody will match becaue the oo falls in between the m and d's *, the string has a and d in it so it matches.
more bloody towels will match because the 'ore bloo' falls in the place of *, and the 'y towels' still fills the last *.
master will not match, because 'aster' fits in the place of the first *, but it can not find a d now, so it returns false.
mad will match, because it finds the m and d, but since the format string has a * at the end, it does not require the string to end in any specific characters.
Wildcards may be used in between the pipe key.
The following example will match ALL form of the Fire Spell (I-IV) and Thunder Spell (I-IV) and the Blizzard Spell (I-IV)
Fire*|Thunder*|Blizzard*
REGEX is an EXTREMELY complex and POWERFUL tool used by programmers to do complex matches. Regex support was added to many plugins on January 29th, 2008 using boost::regex.
It's a simple format, and its used IN PLACE OF wildcards, and may be used in multiple definitions.
all Regex matches must open with a (regex<options>) and close with a (/regex). Example (no options):
(regex)^(BLM|SMN|WHM|RDM)/(SCH|WHM|RDM|BLM|SMN)$(/regex)
You may pass options to the opening regex tag to tell the parser what options to test with. By default, It will use Perl style regular expressions and case insensitive match. You may specify the following options to change the regex parser.
(regex-case)....(/regex)
Specifying this switch will make regex test case sensitive.
(regex-basic) or (regex-basic-case)
Specifying this switch will make it use POSIX Basic format. See: http://www.boost.org/libs/regex/doc/syntax_basic.html
(regex-extended) or (regex-extended-case)
Specifying this switch will make it use POSIX Extended format. See: http://www.boost.org/libs/regex/doc/syntax_extended.html
(regex-perl) or (regex-perl-case)
Redundant since default is perl, use if you want it to be clear what format to use.
Specifying this switch will make it use PERL format. See: http://www.boost.org/libs/regex/doc/syntax_perl.html
(regex)^BLM/(WHM|RDM|SCH)$(/regex)|(regex)^RDM/(BLM|WHM|SMN|NIN|WAR)$(/regex)|WHM/*
As you can see, regex may be piped into multiple definitions too, and still can use non regex wild card matches also.
Each match between | are tested if it should use regex or wildcard.