protected function getMatches($regexp, $limit)
	{
		$cnt = preg_match_all($regexp, $this->text, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
		if ($cnt > $limit)
		{
			$matches = array_slice($matches, 0, $limit);
		}

		return $matches;
	}
protected function getMatches($regexp, $limit)
	{
		$cnt = preg_match_all($regexp, $this->text, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
		if ($cnt > $limit)
		{
			$matches = array_slice($matches, 0, $limit);
		}

		return $matches;
	}
protected function getMatches ( $ regexp , $ limit ) { $ cnt = preg_match_all ( $ regexp , $ this -> text , $ matches , PREG_SET_ORDER | PREG_OFFSET_CAPTURE ) ; if ( $ cnt > $ limit ) { $ matches = array_slice ( $ matches , 0 , $ limit ) ; } return $ matches ; }
Execute given regexp and returns as many matches as given limit

@param  string  $regexp
@param  integer $limit
@return array
Execute given regexp and returns as many matches as given limit