Well I wondered if someone could help me out with some pattern matching. I have it working with Regex's but there appears to be a pretty major memory leak in the Regex system in the beta so I want to find a solution using normal pattern matching until the leak gets fixed.
The patterns I need to match are:
Single summon patterns:
--> Poisonous Toad:+
--> Ghast:A
Double summon patterns:
--> Poisonous Toad:B, Ghast:A
Triple summon patterns:
--> Poisonous Toad:B, Giant Spider:A, Ghast:A
4 summon patterns:
--> Poisonous Toad:B, Giant Spider:A, Ghast:A, Werewolf:B
Now initially I tried the following patterns to match it:
Single:
--> (*):(*)$
Double:
--> (*):(*), (*):(*)$
Triple:
--> (*):(*), (*):(*), (*):(*)$
4:
--> (*):(*), (*):(*), (*):(*), (*):(*)$
Major problem with these is the Double will match 3 summons because it will assign the % variables as follows:
%1:Poisonous Toad:B, Giant Spider
%2:A
%3:Ghast
%4:A
Now if there is a way that I can get something like %w to match 2 words that would work nicely.
Jaerin