Skip to content

Commit

Permalink
pacer/docket_report.py: Explain DATE_REGEX a little better
Browse files Browse the repository at this point in the history
It's not a 100% obvious regexp, especially given the unicode
characters in it.
  • Loading branch information
johnhawkinson committed Oct 12, 2023
1 parent 242b205 commit 5b678aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions juriscraper/pacer/docket_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class BaseDocketReport:
little class as a mixin with the common components.
"""

# A date is one or more characters that are members of the class
# of endashes (U+2014), digits, ASCII dashes (U+002D), emdashes
# (U+2013), and ASCII slashes.
DATE_REGEX = r"[—\d\-–/]+"

date_entered_regex = re.compile(r"Entered:\s+(%s)" % DATE_REGEX)
Expand Down

0 comments on commit 5b678aa

Please sign in to comment.