mirror of
https://github.com/placeAtlas/atlas.git
synced 2025-01-04 00:23:42 +01:00
Fix commatization regex
This commit is contained in:
parent
50585d1686
commit
8019a27a45
2 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@
|
|||
- [place.reddit.com](https://place.reddit.com)
|
||||
"""
|
||||
FS_REGEX = {
|
||||
"commatization": r'( *(,+ +|,+ |,+)| +)(and|&|;)( *(,+ +|,+ |,+)| +)|, *$| +',
|
||||
"commatization": r'[,;& ]+(?:and)?[,;& ]*?',
|
||||
"pattern1": r'\/*[rR]\/([A-Za-z0-9][A-Za-z0-9_]{2,20})(?:\/$)?',
|
||||
"pattern2": r'^\/*[rR](?!\/)([A-Za-z0-9][A-Za-z0-9_]{2,20})(?:\/$)?',
|
||||
"pattern3": r'(?:(?:https?:\/\/)?(?:(?:www|old|new|np)\.)?)?reddit\.com\/r\/([A-Za-z0-9][A-Za-z0-9_]{2,20})(?:\/[^" ]*)*',
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
EXPANSION_1_RANGE = (56, END_IMAGE)
|
||||
EXPANSION_2_RANGE = (109, END_IMAGE)
|
||||
|
||||
COMMATIZATION = re.compile(r'(?: *(?:,+ +|,+ |,+)| +)(?:and|&|;)(?: *(?:,+ +|,+ |,+)| +)|, *$| +')
|
||||
COMMATIZATION = re.compile(r'[,;& ]+(?:and)?[,;& ]*?')
|
||||
FS_REGEX = re.compile(r'(?:(?:(?:(?:https?:\/\/)?(?:(?:www|old|new|np)\.)?)?reddit\.com)?\/)?[rR]\/([A-Za-z0-9][A-Za-z0-9_]{2,20})(?:\/[^" ]*)*')
|
||||
|
||||
def migrate_atlas_format(entry: dict):
|
||||
|
|
Loading…
Reference in a new issue