protected function getRegex()
    {
        if ($this->regex === null) {
            $this->regex = $this->buildRegex($this->getTokens(), $this->constraints);
        }

        return $this->regex;
    }