Page 1 of 1

Filtering expression for e-mails with date in their names [SOLVED]

Posted: Fri Dec 29, 2023 11:44 am
by Thy Grand Voidinesss
I need to find all EML files that start with dates in format
YYYYMMDD
. And that is precisely
YYYYMMDD
and not
YYYY MM DD
or
YY_MM_DD
nor any other variant

I suck at this, so can anyone help me? Filtering out file format will not be a problem, but looking for the right / right amount of digits sure is problematic for me

Re: Filtering expression for e-mails with date in their names

Posted: Fri Dec 29, 2023 4:15 pm
by therube
Are you looking for a regex: ?
As a start, maybe something like: regex:(19|20)\d\d[01][1-9][0-31]\w

(There could be some false "dates" with that.)

Re: Filtering expression for e-mails with date in their names

Posted: Fri Dec 29, 2023 4:54 pm
by Thy Grand Voidinesss
Yes, I am looking for a regular expression

The above works, but does not limit itself to the beginning of name- it needs to take into consideration only the first 8 characters

Re: Filtering expression for e-mails with date in their names

Posted: Fri Dec 29, 2023 7:27 pm
by therube
Add a ^:
regex:^(19|20)\d\d[01][1-9][0-31]\w

Re: Filtering expression for e-mails with date in their names

Posted: Thu Jan 04, 2024 10:40 am
by Thy Grand Voidinesss
Thank you. It was not perfect. as it did not single out all of the files with very long names / repeating sections with igits, but I managed to pin point them using also other methods


And later on I managed to find also all files starting with the date and time format
YYYY MM DD - HH.MM.SS
using this

Code: Select all

regex:^(\d{4})\s(\d{2})\s(\d{2})\s-\s(\d{2})\.(\d{2})\.(\d{2})