mIRC Homepage
Posted By: DanElectro regex \0 change - 20/08/07 08:06 AM
in 6.21 \0 was returning the number of matches from the current point, in 6.3 its just returning total matches.

ie:
$regsubex(test,/(.)/g,\0) would return 4321 but now its returning 4444
Posted By: Supersonic Re: regex \0 change - 20/08/07 08:20 AM
no! in 6.21 and 6.3 return 4444
in version 6.2 return 4321
Posted By: Collective Re: regex \0 change - 20/08/07 08:20 AM
The \0 behaviour hasn't changed. Perhaps you're thinking of \n, which would give 1234 for the above example (not 4321).

Since \0 is supposed to give the total number of matches it seems reasonable for it not to change.
Posted By: DanElectro Re: regex \0 change - 20/08/07 08:29 AM
I just tested it again on 6.2 and it returns 4321
Posted By: DanElectro Re: regex \0 change - 20/08/07 08:33 AM
hm, just checked versions.txt and for 6.21 changes it says

20.Fixed $regsubex() bug with \0 parameter and various other

i guess that was it smirk
© mIRC Discussion Forums