public function matchAll($regex)
    {
        $matches = array();
        $result = preg_match_all($regex, $this->toString(), $matches, PREG_SET_ORDER);
        if($this->isValidRegex($regex) && $result!==false && $result>0)
        {
            return ArrayList::asObjectArray($matches);
        }
        return null;
    }
public function matchAll($regex)
    {
        $matches = array();
        $result = preg_match_all($regex, $this->toString(), $matches, PREG_SET_ORDER);
        if($this->isValidRegex($regex) && $result!==false && $result>0)
        {
            return ArrayList::asObjectArray($matches);
        }
        return null;
    }
public function matchAll ( $ regex ) { $ matches = array ( ) ; $ result = preg_match_all ( $ regex , $ this -> toString ( ) , $ matches , PREG_SET_ORDER ) ; if ( $ this -> isValidRegex ( $ regex ) && $ result !== false && $ result > 0 ) { return ArrayList :: asObjectArray ( $ matches ) ; } return null ; }
Get all matches by regex
@param string $regex
@return \PerrysLambda\ArrayList
Get all matches by regex