Fix yakafokon: simplification de la regex et correction du cas "ça serait bien"#12
Open
Fix yakafokon: simplification de la regex et correction du cas "ça serait bien"#12
Conversation
entwanne
approved these changes
Mar 3, 2023
JulienPalard
requested changes
Mar 10, 2023
|
|
||
| @irc3.event( | ||
| r":(?P<mask>\S+) PRIVMSG {channel} :" | ||
| r".*\s(faudrai.|faut|ca serait bien que)\s+qu.*" |
Collaborator
There was a problem hiding this comment.
Pourquoi enlever ce \s ? Il a du sens pour moi, pour éviter des faux positifs comme "arguments par défaut qui sont None"
There was a problem hiding this comment.
Je me dis qu'une alternative, si on veut reconnaître "faut que..." après un espace mais aussi en début de ligne, serait de mettre \b (frontière de mot) avant le motif.
\bMatches the empty string, but only at the beginning or end of a word.
Collaborator
There was a problem hiding this comment.
Vendu pour \b. Tu as raison ça règle plein de cas, comme (faut que qu'on merge ça).
Author
There was a problem hiding this comment.
J'ai pas encore eu l'occasion de m'en occuper, je fais ça plus tard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Correction d'une erreur dans la regex qui invalidait le cas du "ça serait bien que".
Test des différents cas pris en charge (ou volontairement écartés) sur Regex101 :