protected function generatePathRegex() {
		if( $this->pathRegex ) { return; }
		$variables = array();
		$this->pathRegex = preg_replace_callback(
			'#\{([^\}]+)\}#sm',
			function($matches) use(&$variables) {
// 				debug('$matches', $matches);
				$regex = $var = null;
				static::extractVariable(str_replace('\.', '.', $matches[1]), $var, $regex);
				$variables[] = $var;
				return '('.$regex.')';
			},
			str_replace('.', '\.', $this->path)
		);
		$this->pathVariables = $variables;
	}