public function isValid($tag)
    {
        if (strlen($this->tagPrefix) > 0 && strpos($tag, $this->tagPrefix) !== 0) {
            return false;
        }

        return preg_match('/^' . $this->regex . '$/', substr($tag, strlen($this->tagPrefix))) == 1;
    }
public function isValid($tag)
    {
        if (strlen($this->tagPrefix) > 0 && strpos($tag, $this->tagPrefix) !== 0) {
            return false;
        }

        return preg_match('/^' . $this->regex . '$/', substr($tag, strlen($this->tagPrefix))) == 1;
    }
public function isValid ( $ tag ) { if ( strlen ( $ this -> tagPrefix ) > 0 && strpos ( $ tag , $ this -> tagPrefix ) !== 0 ) { return false ; } return preg_match ( '/^' . $ this -> regex . '$/' , substr ( $ tag , strlen ( $ this -> tagPrefix ) ) ) == 1 ; }
Check if a tag is valid

@param string $tag

@return bool
Check if a tag is valid