mIRC Homepage

help with $regsub

Posted By: Pap

help with $regsub - 15/02/04 07:58 AM

Could someone please explain to me why in the world when I do:
//echo -a $regsub([HH:nn],[A-Za-z]*, $chr(46), %foo) %foo
it returns: ".[HH:nn]" instead of "[..:..]"

further confusing me is why when I do:
//echo -a $regsub([HH:nn],[A-Za-z], $chr(46), %foo) %foo
it returns "[.H:nn]"

Maybe this is because I have no idea how to write a regular expression, or because I have no idea how to use $regsub properly, or because it's a bug in mIRC 6.12, or because I'm just a n00b confused

thanks
Posted By: Collective

Re: help with $regsub - 15/02/04 08:04 AM

Try this:
//echo -a $regsub([HH:nn],/[A-Za-z]/g,$chr(46),%foo) %foo
Posted By: Pap

Re: help with $regsub - 15/02/04 08:10 AM

ah excellent. I forgot about those switches. thank you very much!
© 2021 mIRC Discussion Forums