This experiment that i want to find out how good Rex_pcre lib is... since it probably very new library. Nevertheless I found something interesting while playing with this kind of experiment.
Also this experiment also including by go against mushclient's trigger's regex pattern matching.
the regex line would be this:
and trigger line is thus:
the
this is lua code i use to check the wildcards. as usual everybody no doubt everybody use it anyway!
mushclient's wildcards match:
rex_pcre lib's wildcards match:
notice the difference? it's the channel wildcard. In fact I was expect it to be just 'Serenwilde' not '(Serenwilde)'
The the version of rex_pcre library i am using is 2.2. Just a thought!
Also this experiment also including by go against mushclient's trigger's regex pattern matching.
the regex line would be this:
"\((?P<channel>.+)\): (?P<who>.+?)(| \((?P<where>.+)\)) say(|s), \"(?P<comment>.+)\"
and trigger line is thus:
(Serenwilde): You say, "Hmmhmm."
the
this is lua code i use to check the wildcards. as usual everybody no doubt everybody use it anyway!
for key, value in pairs(wildcards) do
if type(value) == "boolean" then
print("KEY:" .. key .. " value:" .. tostring(value))
else
print("KEY:" .. key .. " value:" .. value)
end --if
end --if
mushclient's wildcards match:
(Serenwilde): You say, "Hmmhmm."
KEY:1 value:Serenwilde
KEY:2 value:You
KEY:3 value:
KEY:4 value:
KEY:5 value:
KEY:6 value:Hmmhmm.
KEY:comment value:Hmmhmm.
KEY:channel value:Serenwilde
KEY:0 value:(Serenwilde): You say, "Hmmhmm."
KEY:who value:You
KEY:where value:
rex_pcre lib's wildcards match:
id:1 v:(Serenwilde)
id:2 v:(Serenwilde)
id:3 v:You
id:4 v:
id:5 v:false
id:6 v:false
id:7 v:s
id:8 v:Hmmhmm.
id:who v:You
id:where v:false
id:comment v:Hmmhmm.
id:channel v:(Serenwilde)
notice the difference? it's the channel wildcard. In fact I was expect it to be just 'Serenwilde' not '(Serenwilde)'
The the version of rex_pcre library i am using is 2.2. Just a thought!