jamesridgway / attachment-downloader

Simple tool for downloading email attachments for all emails in a given folder using an IMAP client
MIT License
85 stars 39 forks source link

Two new parser options for regex matching #46

Closed JohnnyGrey86 closed 10 months ago

JohnnyGrey86 commented 12 months ago

I have added two new options for the script, "subject_regex_match_anywhere" and "subject_regex_ignore_case".

re.match() only matches against the beginning of a text string. If subject_regex_match_anywhere is provided, it instead performs a re.search()

If subject_regex_ignore_case is provided, the re.IGNORECASE flag is provided.

Not sure if it's the most efficient way, but it works. Note: I am 100% new to Python, but have some novice VBA experience.