public function match($regex)
    {
        $match = array();
        if($this->isValidRegex($regex) && preg_match($regex, $this->toString(), $match)===1)
        {
            return new ObjectArray($match);
        }
        return null;
    }