How to recognize/match a date in filename?

I want to check that a file has a date in the filename (e.g. 2022-03-28 log.jpg).

I tried:

  • Name matches [\d\d\d\d-\d\d-\d\d] log
  • Extension is JPG.

However, the rule doesn’t recognize the file. How can I match the yyyy-mm-dd? Thanks.

No, that’s not possible as the matches don’t use regular expressions.
Use [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].

1 Like

I searched for regex and should have searched for wildcards instead. Thanks

You’re welcome :slight_smile: