File Iterator - Filter Regex

I am using the File Iterator component. I am looking for specific .txt files in an S3 bucket. I have the following regex in the Filter Regex field:

^${var_File_Name}\S*.txt$

  • ${var_File_Name} = test_details

  • full file name = test_details_20250101.txt

I have tried without the ^ and the $. I’ve even went as far as to removing the job variable and \S. I have the same regex in a separate File Iterator for an SFTP input, works perfectly fine.

We have two servers, one with 1.75.35 and another on 1.72.4, I’m having this issue on both.

Any ideas what could be going on?

Hello @jvaughn

Thanks for your post and welcome to the Matillion Community.

I spoke to a colleague who mentioned that the Kleene star * now means “0 or more repetitions of the previous token”, rather than “0 or more of any token”.

That’s not a wildcard, as you’d expect.

What you want is ., which matches any character, and the dot that’s there needs to be quoted.

The regex should be something like:

${var_File_Name}\S.*\.txt$

I hope this helps, please keep me posted.

Kind regards, Joe