I have a series of strings that all look roughly like this.
- Conf. w/attorney, defendant, bondsman. Magistrate ct., PA - Research - 2.7 hrs - 86 miles
I need to write a regular expression that matches the
- Conf. w/attorney, defendant, bondsman. Magistrate ct., PA -
and - Research -
parts of the string.
But not the hrs
and miles
segments.
x = re.findall('-[.^\\-0-9]*-', line)
Is what I've tried so far, but that doesn't return any matches.
I'm sure I'm just writing the RE wrong.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.