Skip to content

Commit

Permalink
Merge pull request #99 from facebook/fv-regex-fix
Browse files Browse the repository at this point in the history
Prevent overly eager regex match in `fv` command
  • Loading branch information
mattjgalloway committed Sep 15, 2015
2 parents b0f477b + 61f5f2e commit ed8ad40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commands/FBFindCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def run(self, arguments, options):

def printMatchesInViewOutputStringAndCopyFirstToClipboard(needle, haystack):
first = None
for match in re.finditer('.*<.*(' + needle + ').*: (0x[0-9a-fA-F]*);.*', haystack, re.IGNORECASE):
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))
Expand Down

0 comments on commit ed8ad40

Please sign in to comment.