It would be wiser if you were a bit more subtle, since all of your accusations are actually your fault.

1) The bracket-related problems you have probably occur because you use the literal characters ( and ) as parameters to $regex. mirc doesn't accept that though: the way mirc works makes it impossible to use the actual characters in the script. They need to be "escaped" in a way; either by setting a local %variable or using $chr(40) and $chr(41). Here's what I mean:
Code:
//var %a = ), %b = /[)]/ | echo -s $regex(%a,%b)
This works fine. However, this:
Code:
//echo -s $regex(),/[)]/)
doesn't, because mirc treats the first ) char as the closing bracket of $regex().



2) I'd also like to point out that while documentation of regular expressions is missing it WOULD have been nice to point to which model was being used as not all of them have the same features

/help acknowledgements
It mentions there that the regex library used is PCRE, and it's a matter of seconds to find the appropriate URL on google: http://www.pcre.org/man.txt



3) Regarding the $regml() problem, it's just the way PCRE works (and, imo, it's the correct way).

$regex(TEST, teststring, /(test)st(d)?(ring)/ )
//echo $regml(TEST, 1) - $regml(TEST, 2) - $regml(TEST, 3)

Since the "?" is outside the capturing subpattern, I would expect the results mirc gives. If you don't want to lose the positions the way you described you should simply change your pattern to this:
$regex(TEST, teststring, /(test)st(d?)(ring)/ )

I find it odd that Perl works the way you described, but in any way, it feels both more powerful and correct the PCRE way.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com