Naww. The intent is clear to me, even though the author obfuscated it with confusing examples. This is a stupid thread, and the author likely didn't read the mIRC help file for long. He wants to identify whether the input matches and/or contains characters like $ % | and , probably to prevent his vulnerable script from executing code.
Code:
var %re = /[,|%$]/, %x = $regex(char,$1,%re)
if (%x > 0) {
echo -s WARNING: $nick just used $+(",$regml(char,1),") in private.
}
edit, something better:
Code:
var %chars = ,|$%
var %x = 1
while ($mid(%chars,%x,1)) {
if ($regex(char,$1-,/(\ $+ $v1 $+ )/) > 0) {
echo -s WARNING: $nick just used $+(",$regml(char,1),") in private.
}
inc %x
}
edit again, something else:
Code:
var %char = ,|$%
var %x = 1
while ($mid(%char,%x,1)) {
if ($v1 isin $1-) {
echo -s WARNING: $nick just used $+(",$v1,") in private.
}
inc %x
}