Skip to content

Commit

Permalink
Merge pull request #45 from deardurham/sv-specialCharCountyNames
Browse files Browse the repository at this point in the history
Accept special characters in county names
  • Loading branch information
robert-w-gries authored Oct 13, 2020
2 parents 474384f + 665c88e commit dd3220c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ciprs_reader/parser/section/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CaseDetails(HeaderParser):
"""Extract County and File No from header on top of first page"""

pattern = (
r"\s*Case (Details|Summary) for Court Case[\s:]+(?P<county>(\w\s*)+) (?P<fileno>\w+)"
r"\s*Case (Details|Summary) for Court Case[\s:]+(?P<county>(\w\s*.*)+) (?P<fileno>\w+)"
)

def extract(self, matches, report):
Expand Down
4 changes: 4 additions & 0 deletions tests/parsers/test_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
{"county": "OLD HANOVER", "fileno": "99FN9999999"},
" Case Summary for Court Case: OLD HANOVER 99FN9999999",
),
(
{"county": "GUILFORD-GR", "fileno": "15CR000000"},
" Case Summary for Court Case: GUILFORD-GR 15CR000000",
),
]


Expand Down

0 comments on commit dd3220c

Please sign in to comment.