def printMatchesInViewOutputStringAndCopyFirstToClipboard(needle, haystack):
  first = None
  for match in re.finditer('.*<.*(' + needle + ')\\S*: (0x[0-9a-fA-F]*);.*', haystack, re.IGNORECASE):
    view = match.groups()[-1]
    className = fb.evaluateExpressionValue('(id)[(' + view + ') class]').GetObjectDescription()
    print('{} {}'.format(view, className))
    if first is None:
      first = view
      cmd = view % 'echo %s | tr -d "\n" | pbcopy'
      os.system(cmd)
dataset/ETHPy150Open facebook/chisel/commands/FBFindCommands.py/printMatchesInViewOutputStringAndCopyFirstToClipboard/swapped operands of `%`