function search ($pattern, $from = 0, &$match = null)
  {
    self::toUnicodeRegex ($pattern);
    if (preg_match ($pattern, $this->S, $m, PREG_OFFSET_CAPTURE)) {
      list ($match, $ofs) = $m[0];
      return $ofs;
    }
    return false;
  }
function search ($pattern, $from = 0, &$match = null)
  {
    self::toUnicodeRegex ($pattern);
    if (preg_match ($pattern, $this->S, $m, PREG_OFFSET_CAPTURE)) {
      list ($match, $ofs) = $m[0];
      return $ofs;
    }
    return false;
  }
function search ( $ pattern , $ from = 0 , & $ match = null ) { self :: toUnicodeRegex ( $ pattern ) ; if ( preg_match ( $ pattern , $ this -> S , $ m , PREG_OFFSET_CAPTURE ) ) { list ( $ match , $ ofs ) = $ m [ 0 ] ; return $ ofs ; } return false ; }
Finds the position of the first occurrence of a pattern in the current string.

><p>This is an extended version of {@see indexOfPattern}.

@param string $pattern A regular expression.
@param int    $from    The position where the search begins, counted from the beginning of the current string.
@param string $match   [optional] If a variable is specified, it will be set to the matched substring.
@return int|bool false if no match was found.
Finds the position of the first occurrence of a pattern in the current string .