From 6edb7e3f864ee52bf9517a1a6651d2f6f2624244 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 31 Aug 2019 11:29:49 +0200 Subject: [PATCH] Change slightly the diario regex --- royalnet/commands/royalgames/diario.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/royalnet/commands/royalgames/diario.py b/royalnet/commands/royalgames/diario.py index 5766d9d4..664f67de 100644 --- a/royalnet/commands/royalgames/diario.py +++ b/royalnet/commands/royalgames/diario.py @@ -108,7 +108,7 @@ class DiarioCommand(Command): if raw_text: # Pass the sentence through the diario regex match = re.match( - r'(!)? *["«‘“‛‟❛❝〝"`]([^"]+)["»’”❜❞〞"`] *(?:(?:-{1,2}|—) *([\w ]+))?(?:, *([^ ].*))?', + r'(!)? *["«‘“‛‟❛❝〝"`]([^"]+)["»’”❜❞〞"`] *(?:(?:-{1,2}|—) *([^,]+))?(?:, *([^ ].*))?', raw_text) # Find the corresponding matches if match is not None: @@ -162,7 +162,7 @@ class DiarioCommand(Command): # Recreate the full sentence raw_text = " ".join(args) # Pass the sentence through the diario regex - match = re.match(r'(!)? *["«‘“‛‟❛❝〝"`]([^"]+)["»’”❜❞〞"`] *(?:(?:-{1,2}|—) *([\w ]+))?(?:, *([^ ].*))?', + match = re.match(r'(!)? *["«‘“‛‟❛❝〝"`]([^"]+)["»’”❜❞〞"`] *(?:(?:-{1,2}|—) *([^,]+))?(?:, *([^ ].*))?', raw_text) # Find the corresponding matches if match is not None: