Repository URL to install this package:
|
Version:
0.2.0a1 ▾
|
import re
def simplify_regex_named_groups(regex: str):
"""return regex without named groups, but keeps the content as an unnamed group"""
return re.sub(r'\(\?P<[^>]+>', '(', regex)