you can also do ridiculous pattern matching against the name field with REGEXP, but you'll end up having to use COLLATE utf8_bin if you want case sensitivity. i'm not sure what the side-effects might be as far as unexpected results with binary collation. i was puttering around with it earlier and stopped when my query started to look like this:
Code:
SELECT
name, id
FROM
npc_types
WHERE
name
REGEXP
'^[^#]?Familiar|Sum(Air|Earth|Water|Fire)|(Swarm|Pet)[A-Z]'
COLLATE
utf8_bin;
mysql info on regexp
http://dev.mysql.com/doc/refman/5.1/en/regexp.html
regular expression pattern matching is insanely powerful, but you sometimes end up going insane trying to get your pattern to do exactly what you want it to do. they're not used for anywhere near what they have the power to do in most quest scripts you'll see, as they are normally only in EVENT_SAY for simple (and often incorrect) string matches.
perl re info
http://perldoc.perl.org/perlre.html
here are a couple of gui apps that are handy to use when writing more complex expressions
http://www.weitz.de/regex-coach/
http://www.regexbuddy.com/