class_docstr: Matches requests with paths specified by ``path_pattern`` regex.
class_docstr_tok: ["Matches","requests","with","paths","specified","by","``","path_pattern","``","regex","."]
code: def __init__(self, path_pattern):
      if isinstance(path_pattern, basestring_type):
          if not path_pattern.endswith("$"):
              path_pattern += "$"
          self.regex = re.compile(path_pattern)
      else:
          self.regex = path_pattern
  
      assert len(self.regex.groupindex) in (0, self.regex.groups), (
          "groups in url regexes must either be all named or all "
          "positional: %r" % self.regex.pattern
      )
  
      self._path, self._group_count = self._find_groups()
  
imports: from __future__ import absolute_import, division, print_function
  import re
  from functools import partial
  from tornado import httputil
  from tornado.httpserver import _CallableAdapter
  from tornado.escape import url_escape, url_unescape, utf8
  from tornado.log import app_log
  from tornado.util import basestring_type, import_object, re_unescape, unicode_type
label_desc: Use image node_id 1 to create a new PathMatches object from inherited base classes: Matcher with example: obj = PathMatches(path_pattern)