mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Change slightly the diario regex
This commit is contained in:
parent
1f4882b9f7
commit
6edb7e3f86
1 changed files with 2 additions and 2 deletions
|
@ -108,7 +108,7 @@ class DiarioCommand(Command):
|
||||||
if raw_text:
|
if raw_text:
|
||||||
# Pass the sentence through the diario regex
|
# Pass the sentence through the diario regex
|
||||||
match = re.match(
|
match = re.match(
|
||||||
r'(!)? *["«‘“‛‟❛❝〝"`]([^"]+)["»’”❜❞〞"`] *(?:(?:-{1,2}|—) *([\w ]+))?(?:, *([^ ].*))?',
|
r'(!)? *["«‘“‛‟❛❝〝"`]([^"]+)["»’”❜❞〞"`] *(?:(?:-{1,2}|—) *([^,]+))?(?:, *([^ ].*))?',
|
||||||
raw_text)
|
raw_text)
|
||||||
# Find the corresponding matches
|
# Find the corresponding matches
|
||||||
if match is not None:
|
if match is not None:
|
||||||
|
@ -162,7 +162,7 @@ class DiarioCommand(Command):
|
||||||
# Recreate the full sentence
|
# Recreate the full sentence
|
||||||
raw_text = " ".join(args)
|
raw_text = " ".join(args)
|
||||||
# Pass the sentence through the diario regex
|
# Pass the sentence through the diario regex
|
||||||
match = re.match(r'(!)? *["«‘“‛‟❛❝〝"`]([^"]+)["»’”❜❞〞"`] *(?:(?:-{1,2}|—) *([\w ]+))?(?:, *([^ ].*))?',
|
match = re.match(r'(!)? *["«‘“‛‟❛❝〝"`]([^"]+)["»’”❜❞〞"`] *(?:(?:-{1,2}|—) *([^,]+))?(?:, *([^ ].*))?',
|
||||||
raw_text)
|
raw_text)
|
||||||
# Find the corresponding matches
|
# Find the corresponding matches
|
||||||
if match is not None:
|
if match is not None:
|
||||||
|
|
Loading…
Reference in a new issue