public function getRewriteRuleRegex()
{
// Get the regex of the compiled route
$routeRegex = $this->getCompiled()->getRegex();
// Remove the first part (#^/) of the regex because WordPress adds this already by itself
$routeRegex = preg_replace('/^\\#\\^\\//', '^', $routeRegex);
// Remove the last part (#s$) of the regex because WordPress adds this already by itself
$routeRegex = preg_replace('/\\#[s]$/', '', $routeRegex);
return $routeRegex;
}