I realize this post is a couple months behind, but I didn't notice this thread until now (when Online linked to it) and feel like adding my own experience to it anyway.

qwerty's on the money about it crashing when $regsub dumps a string greater-than ~950 into %var.

In my experience, this happens most when I place user-input in the expression. For the longest time, I couldn't figure out why mIRC crashed whenever my nick was "Raccoon|" until I realized I used $me in a $regsub pattern and it was treating the "|" as "OR Nothing", so wherever it didn't match "Raccoon" it was matching the Nothing between each and every letter.

As far as I can tell, and from everyone I've asked, it's not possible to escape an entire string in PCRE.

I might propose the obvious and have mIRC crop the output text to ~950 chars before it gets dumped into %var, provided Khaled hasn't done this already.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!