diff --git a/SHALookup.py b/SHALookup.py index 0c0a862..b562070 100644 --- a/SHALookup.py +++ b/SHALookup.py @@ -21,7 +21,7 @@ success_tag = config.success_tag if hasattr(config, 'success_tag') else "SHA: Match" failure_tag = config.failure_tag if hasattr(config, 'failure_tag') else "SHA: No Match" -VERSION = "1.4.0" +VERSION = "1.4.1" MAX_TITLE_LENGTH = 64 try: diff --git a/SHALookup.yml b/SHALookup.yml index 82bae55..33d7111 100644 --- a/SHALookup.yml +++ b/SHALookup.yml @@ -7,4 +7,4 @@ sceneByFragment: - SHALookup.py - query -# Last Updated 2023-12-06 \ No newline at end of file +# Last Updated 2023-12-09 \ No newline at end of file diff --git a/oftitle.py b/oftitle.py index 1935a5a..4202184 100644 --- a/oftitle.py +++ b/oftitle.py @@ -1,6 +1,6 @@ import re -dmRegex = "(?:^|\s*|[^\w]*)(dm)(?:[\'\‘\’\`\"\“\”]*)(?:s?)(?:$|\s*|[^\w]*)" +dmRegex = "\b(dm)(?:[\'\‘\’\`\"\“\”]*)(?:s?)\b" triggerArray = [ # DM / in your DMs "dm", @@ -38,7 +38,7 @@ def findTrailerTrigger(oftitle): return True # check other regex array for trigger in triggerArray: - triggerRegex = "(?:^|\s)(" + trigger + ")(?:$|\s)" + triggerRegex = f"\b{trigger}\b" if re.search(triggerRegex, oftitle, re.IGNORECASE): return True return False \ No newline at end of file