class_docstr: Simple scanner
  
  All method patterns are regular expression strings (not
  compiled expressions!)
docstr: Scan the text for the given pattern and update pos/match
  and related fields. The return value is a boolen that
  indicates if the pattern matched. The matched value is
  stored on the instance as ``match``, the last value is
  stored as ``last``. ``start_pos`` is the position of the
  pointer before the pattern was matched, ``pos`` is the
  end position.
code: def scan(self, pattern):
      """
      Scan the text for the given pattern and update pos/match
      and related fields. The return value is a boolen that
      indicates if the pattern matched. The matched value is
      stored on the instance as ``match``, the last value is
      stored as ``last``. ``start_pos`` is the position of the
      pointer before the pattern was matched, ``pos`` is the
      end position.
      """
      if self.eos:
          raise EndOfText()
      if pattern not in self._re_cache:
          self._re_cache[pattern] = re.compile(pattern, self.flags)
      self.last = self.match
      m = self._re_cache[pattern].match(self.data, self.pos)
      if m is None:
          return False
      self.start_pos = m.start()
      self.pos = m.end()
      self.match = m.group()
      return True
  
file_path: catboost/contrib/python/Pygments/py2/pygments/scanner.py
imports: import re
label_desc: Use image node_id 5 for calling the Scanner obj's underlying member method code with example usage: obj.scan(pattern) and returns: True, False