sunslayer commented on a Page, PHPTok  -  Dec 05, 2009
    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

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.