Issue with Regex Matching in Make's Text Parser

I am encountering an issue with a regular expression in a Make scenario, specifically when using the text parser’s match pattern feature. The regex was developed by GPT and works perfectly on regex101. However, when applied in the Make scenario, the match pattern response is always empty.

Here is the regular expression I am using:

(?:statement_QB2505_\d{4}-\d{2}-\d{2}_\d{4}-\d{2}-\d{2}_[A-Z]{3}\.csv|EVP9710008349205_\d{4}-\d{2}-\d{2}_\d{4}-\d{2}-\d{2}\.csv|account_statement_3429624_\d{8}_\d{8}\.csv|statement_\d{2}\.\d{2}\.\d{4}-\d{2}\.\d{2}\.\d{4}\.csv|statement_70129466_[A-Z]{3}_\d{4}-\d{2}-\d{2}_\d{4}-\d{2}-\d{2}\.csv|40802810601500207960 044525104\(\d{2}\.\d{2}\.\d{4} - \d{2}\.\d{2}\.\d{4}\)\.csv|CSV_236998_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}-\d{3}\.csv|comprovativo-?\d{0,3}\.csv|statement\((?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{1,2}, \d{4} - (?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{1,2}, \d{4}\)\.csv)

I have verified the regular expression against the following sample filenames on regex101, and it successfully matches them:

  1. statement_QB2505_2024-04-01_2024-04-30_EUR.csv
  2. EVP9710008349205_2024-05-01_2024-05-31.csv
  3. account_statement_3429624_03032024_03062024.csv
  4. statement_11.12.2023-11.06.2024.csv
  5. statement_70129466_EUR_2024-04-01_2024-06-05.csv
  6. 40802810601500207960 044525104(01.01.2024 - 11.06.2024).csv
  7. CSV_236998_2024-06-11_11-32-01-824.csv
  8. comprovativo-18.csv
  9. statement(May 1, 2024 - May 31, 2024).csv

Unfortunately, in the Make scenario, the regex does not seem to produce any matches. I have attached screenshots for your reference.

Could you please help me understand why the regular expression is not working within Make’s text parser, and provide any suggestions to resolve this issue?


Hi @ELCH

To resolve the issue with your regular expression in the Make scenario, ensure that the “global match” option is enabled. This adjustment should allow the regex to work correctly.
image

Output:

2 Likes

The real issue is that your regular expression pattern is using a NON-CAPTURING GROUP, which only works when “Global Match” is selected.

At the beginning of your pattern,

(?:

To make it work for single captures, you need to remove the non-capturing group to make it a normal capturing group.

(

Updated pattern:

(statement_QB2505_\d{4}-\d{2}-\d{2}_\d{4}-\d{2}-\d{2}_[A-Z]{3}\.csv|EVP9710008349205_\d{4}-\d{2}-\d{2}_\d{4}-\d{2}-\d{2}\.csv|account_statement_3429624_\d{8}_\d{8}\.csv|statement_\d{2}\.\d{2}\.\d{4}-\d{2}\.\d{2}\.\d{4}\.csv|statement_70129466_[A-Z]{3}_\d{4}-\d{2}-\d{2}_\d{4}-\d{2}-\d{2}\.csv|40802810601500207960 044525104\(\d{2}\.\d{2}\.\d{4} - \d{2}\.\d{2}\.\d{4}\)\.csv|CSV_236998_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}-\d{3}\.csv|comprovativo-?\d{0,3}\.csv|statement\((?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{1,2}, \d{4} - (?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{1,2}, \d{4}\)\.csv)

samliewrequest private consultation

Join the Make Fans Discord server to chat with other makers!

3 Likes

Thank you so much. Now it works properly.

1 Like

No problem, glad I could help!

1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

4. Do join the unofficial Make Discord server for live chat and video assistance

samliewrequest private consultation

Join the Make Fans Discord server to chat with other makers!

1 Like