original_string: protected function createRegex($matched)
  	{
  		$startSlash = $matched[1] ? true : false;
  		$param      = $matched[2];
  		$optional   = $matched[3] ? true : false;
  		$pattern    = $matched[4] ?: null;
  
  		$pattern = $this->conditions[$param] ?: $pattern ?: '[^/]+';
  
  		$this->paramNames[] = $param;
  
  		if ($startSlash)
  		{
  			$regex = ($optional ? "(/" : '/') .'(?P<' . $param . '>' . $pattern . ')'. ($optional ? ')?' : '');
  		}
  		else
  		{
  			$regex = '(?P<' . $param . '>' . $pattern . ')'. ($optional ? '?' : '');
  		}
  
  		return $regex;
  	}
code: protected function createRegex($matched)
  	{
  		$startSlash = $matched[1] ? true : false;
  		$param      = $matched[2];
  		$optional   = $matched[3] ? true : false;
  		$pattern    = $matched[4] ?: null;
  
  		$pattern = $this->conditions[$param] ?: $pattern ?: '[^/]+';
  
  		$this->paramNames[] = $param;
  
  		if ($startSlash)
  		{
  			$regex = ($optional ? "(/" : '/') .'(?P<' . $param . '>' . $pattern . ')'. ($optional ? ')?' : '');
  		}
  		else
  		{
  			$regex = '(?P<' . $param . '>' . $pattern . ')'. ($optional ? '?' : '');
  		}
  
  		return $regex;
  	}
code_tokens: protected function createRegex ( $ matched ) { $ startSlash = $ matched [ 1 ] ? true : false ; $ param = $ matched [ 2 ] ; $ optional = $ matched [ 3 ] ? true : false ; $ pattern = $ matched [ 4 ] ? : null ; $ pattern = $ this -> conditions [ $ param ] ? : $ pattern ? : '[^/]+' ; $ this -> paramNames [ ] = $ param ; if ( $ startSlash ) { $ regex = ( $ optional ? "(/" : '/' ) . '(?P<' . $ param . '>' . $ pattern . ')' . ( $ optional ? ')?' : '' ) ; } else { $ regex = '(?P<' . $ param . '>' . $ pattern . ')' . ( $ optional ? '?' : '' ) ; } return $ regex ; }
docstring: Callback for creating route param names regex
  
  @param array $matched
  @return string
docstring_tokens: Callback for creating route param names regex