Initial Commit

Signed-off-by: Daniel Henry <iamdanhenry@gmail.com>
This commit is contained in:
2026-01-28 11:42:27 -06:00
commit da6f623d38
13 changed files with 604 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import re
def remove_disclaimer(text):
# The pattern matches the start and end of your phrase.
# \s+ matches one or more spaces/newlines/tabs.
# re.IGNORECASE makes it case insensitive just in case.
pattern = r"Caution:\s+This\s+email\s+comes\s+from\s+an\s+external\s+sender.*?\s+contact\s+your\s+IT\s+Department\.?"
# Substitute the found pattern with an empty string
cleaned_text = re.sub(pattern, "", text, flags=re.IGNORECASE | re.DOTALL)
return cleaned_text.strip()