def get_chars(s, offset, gochars):
    """ Scan the string `s` for characters in `gochars` starting at `offset`.
      Return `(match,new_offset)`.
  """
    ooffset = offset
    while offset < len(s) and s[offset] in gochars:
        offset += 1
    return s[ooffset:offset], offset
