While this may have been suggested in the past, I don't think it was pointed out why this is needed.
One simple example which pushed me to write this: the default mIRC tool for log file does not allow me to search via regex, I could suggest for it here but in the meantime I still need the functionality.
My log files are much bigger than 4150 characters, of course (so $regex is not an option).
You must be thinking, why I am not using /filter, for example, well that leads to the problem, how do I correctly search multiple line at once? I simply cannot.
Concrete example: I want to find someone saying 'hash table' in my log, but only when the next line contains, let's say 'efficiency'.
In PCRE that's about using:

/^TIMESTAMP NICK .*?hash table.*\nTIMESTAMP NICK .*?efficiency/s

Where TIMESTAMP and NICK handle the format for my timestamp and nick decoration.
Of course it's possible to workaround this, calling /filter -nk to find the first line and then check that the next line has what we want (would probably needs a $read call inside the custom alias called by /filter, this is terrible!)
I also think this is long overdue, I don't see why that wasn't added before.

I was thinking about improving $bfind in this regard, $bfind(&bvar,pattern) seems fine, if pattern is only a number then users can use delimiters, which shouldn't break script.

However this is only good for searching, I suppose replacing would also be great.

$breplace(&binvar,a,o,more,replacement) - no regex replacement, would be equivalent to /breplace but works with string
$breplace(&binvar,/(a)(.)/g,o \n \1).regex - regex replacement, behave the same as $regsubex with its new behavior regarding $regsub: returns the number of replacement made since returning the &binvar wouldn't be useful.

$breplacex would also be a thing, then.

These are just quick idea/syntax I came up with, it could be different as long as the functionality is there.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net