From that link:
PHP Code:
if (re >= REGEX_OK)
{
new str2[64]
new i
//since it returned REGEX_OK, num has
// the number of substrings matched by the pattern.
//the first substring (0) seems to match the whole string.
for (i=0; i<num; i++)
{
regex_substr(re, i, str2, 63)
server_print("Substring %d: %s", i, str2)
}
//the regular expression matcher uses memory.
//you must free it if you get REGEX_OK
//This will also set re to 0.
regex_free(re)
}
You can only free the regex handle if you found a match (i.e. handle >= REGEX_OK). I would use the above if() statement instead of if( nNumber >= 1).
Problem fixed

.
__________________