src/RegexHelper.php
public function getMatches( $regex, $expression, $group = 1 ) {
		if ( preg_match_all(
			'/' . $this->resolveMagic( $regex ) . '/',
			$this->escapeSequences( $expression ),
			$matches
		) ) {
			return $matches[$group];
		}

		return array();
	}
public function getMatches( $regex, $expression, $group = 1 ) {
		if ( preg_match_all(
			'/' . $this->resolveMagic( $regex ) . '/',
			$this->escapeSequences( $expression ),
			$matches
		) ) {
			return $matches[$group];
		}

		return array();
	}
public function getMatches ( $ regex , $ expression , $ group = 1 ) { if ( preg_match_all ( '/' . $ this -> resolveMagic ( $ regex ) . '/' , $ this -> escapeSequences ( $ expression ) , $ matches ) ) { return $ matches [ $ group ] ; } return array ( ) ; }
Returns all matching groups for the given regex.
String and IRI equences are automatically escaped.

@param string $regex
@param string $expression
@param int $group
@return string[]
Returns all matching groups for the given regex . String and IRI equences are automatically escaped .