original_string: public function compile()
  	{
  		//reset arrays
  		$this->params     = [];
  		$this->paramNames = [];
  		$this->conditions = [];
  
  		$this->compiled = true;
  
  		$uri = $this->normalizeUri($this->getUri());
  
  		// match patterns like /{param?:regex}
  		// tested in https://regex101.com/r/gP6yH7
  		$regex = preg_replace_callback(
  			'#(?:(\\/)?\\{(\\w+)(\\?)?(?::((?:\\\\\\{|\\\\\\}|[^{}]|\\{\\d(?:\\,(?:\\d)?)?\\})+))?\\})#',
  			[$this, 'createRegex'],
  			$uri
  		);
  
  		$regex .= "/?";
  
  		$regex = '#^' . $regex . '$#';
  
  		if ($this->caseSensitive === false)
  		{
  			$regex .= 'i';
  		}
  
  		$this->pattern = $regex;
  
  		return $this;
  	}
code: public function compile()
  	{
  		//reset arrays
  		$this->params     = [];
  		$this->paramNames = [];
  		$this->conditions = [];
  
  		$this->compiled = true;
  
  		$uri = $this->normalizeUri($this->getUri());
  
  		// match patterns like /{param?:regex}
  		// tested in https://regex101.com/r/gP6yH7
  		$regex = preg_replace_callback(
  			'#(?:(\\/)?\\{(\\w+)(\\?)?(?::((?:\\\\\\{|\\\\\\}|[^{}]|\\{\\d(?:\\,(?:\\d)?)?\\})+))?\\})#',
  			[$this, 'createRegex'],
  			$uri
  		);
  
  		$regex .= "/?";
  
  		$regex = '#^' . $regex . '$#';
  
  		if ($this->caseSensitive === false)
  		{
  			$regex .= 'i';
  		}
  
  		$this->pattern = $regex;
  
  		return $this;
  	}
code_tokens: public function compile ( ) { //reset arrays $ this -> params = [ ] ; $ this -> paramNames = [ ] ; $ this -> conditions = [ ] ; $ this -> compiled = true ; $ uri = $ this -> normalizeUri ( $ this -> getUri ( ) ) ; // match patterns like /{param?:regex} // tested in https://regex101.com/r/gP6yH7 $ regex = preg_replace_callback ( '#(?:(\\/)?\\{(\\w+)(\\?)?(?::((?:\\\\\\{|\\\\\\}|[^{}]|\\{\\d(?:\\,(?:\\d)?)?\\})+))?\\})#' , [ $ this , 'createRegex' ] , $ uri ) ; $ regex .= "/?" ; $ regex = '#^' . $ regex . '$#' ; if ( $ this -> caseSensitive === false ) { $ regex .= 'i' ; } $ this -> pattern = $ regex ; return $ this ; }
docstring: Compile route uri pattern regex
  
  @return Qlake\Routing\Route
docstring_tokens: Compile route uri pattern regex