function findtok($text,$token,$n,$c) {
$text=explode($c,$text);
foreach ($text as $num => $match)
if ($match==$token) $all.=$num+1 ." ";
$a=numtok($all," ");
if ($n!=0&&$n<=$a) return gettok($all,$c,$n);
else return $a-1;
}
function reptok ($text,$token,$new,$n,$c) {
$text=explode($c,$text);
foreach ($text as $num => $match) {
if ($match==$token) {
$a++;
if ($a==$n||$n==0) $text[$num]=$new;
}
}
return implode($c,$text);
}
function regtok($text,$string,$n,$c) {
$text=explode($c,$text);
foreach ($text as $num => $match)
if (preg_match($string,$match)) $all.=$num+1 ." ";
$a=numtok($all," ");
if ($n!=0&&$n<=$a) return gettok($all,$c,$n);
else return $a-1;
}
they all follow same syntax as mIRC
you can use regtok for wildtok just add a '/' before and after the wildcard string