@mary_b
You could use a Java Regular expression like this:
.*_(20)\d\d(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]).txt
The above will match everything before "_" and then must match a number that starts with "20", followed by to digits "\d\d" (this matches any year in 2001-2099), followed by "(0[1-9]|1[012])" (this matches months 01-09 or 10,11,12), followed by "(0[1-9]|[12][0-9]|3[01])" (this matches days 01-09 or 10-29 or 30 or 31), ending with the text string ".txt".
There are some good regex testers available on the web you may find useful.
https://regexr.com/
http://myregexp.com/
https://www.freeformatter.com/java-regex-tester.html
Hope this helps,
Matt