original_string: protected function getPattern(): string
      {
          $path = preg_replace_callback('~:([a-z][a-z0-9\_]+)~i', function ($match) {
              return sprintf('(?<%s>%s)', $match[1], '[^\/]*');
          }, $this->getPath());
  
          return sprintf('~\G(%s)(/|\z)~', $path);
      }
code: protected function getPattern(): string
      {
          $path = preg_replace_callback('~:([a-z][a-z0-9\_]+)~i', function ($match) {
              return sprintf('(?<%s>%s)', $match[1], '[^\/]*');
          }, $this->getPath());
  
          return sprintf('~\G(%s)(/|\z)~', $path);
      }
code_tokens: protected function getPattern ( ) : string { $ path = preg_replace_callback ( '~:([a-z][a-z0-9\_]+)~i' , function ( $ match ) { return sprintf ( '(?<%s>%s)' , $ match [ 1 ] , '[^\/]*' ) ; } , $ this -> getPath ( ) ) ; return sprintf ( '~\G(%s)(/|\z)~' , $ path ) ; }
docstring: Get pattern to match request path.
  
  @return string
docstring_tokens: Get pattern to match request path .