Page MenuHomePhabricator

[lldb] Tidy some regex in crashlog.py (NFC)
AcceptedPublic

Authored by kastiglione on Fri, Aug 5, 4:26 PM.

Details

Reviewers
JDevlieghere
mib
Summary

A spiritual follow up to D131032. I noticed some regex could be simplified.

This does some of the following:

  1. Removes unused capture groups
  2. Uses non-capturing (?:...) groups where grouping is needed but capturing isn't
  3. Removes trailing .*
  4. Uses \d over [0-9]
  5. Uses raw strings
  6. Uses {N,} to indicate N-or-more

Also improves the call site of a re.findall.

Diff Detail

Event Timeline

kastiglione created this revision.Fri, Aug 5, 4:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptFri, Aug 5, 4:26 PM
kastiglione requested review of this revision.Fri, Aug 5, 4:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptFri, Aug 5, 4:26 PM

this includes changes in D131032 and so depends on it merging first.

This revision is now accepted and ready to land.Sat, Aug 6, 9:15 AM