Matching Attachment Name on 2 Criteria #351
-
Hi there! This is an incredibly helpful tool, so thank you! I'm trying (but struggling) to limit the attachments that get saved based on two criteria. For example, an email contains attachments with the following 3 names: - 003101172267-FE-00100001010001679522.xml
I'm trying to only save down the bolded one. I can't seem to figure out how to tell it only to save files:
The following config (understandably) picks up both XML files: "attachments": [ What is the correct modification to this section of the config to limit the matches based on my two bulleted criteria above? It feels like I'm probably missing something simple here. Any guidance is appreciated. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@grafpaper1987 nice to see that it's helpful for you! 😄 Your use case can easily be solved using Regular Expressions. In case you want to do more with the numbers and characters that are part of the filename you can use Named Capturing Groups that are I hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much! The regex101.com example is incredibly helpful. |
Beta Was this translation helpful? Give feedback.
@grafpaper1987 nice to see that it's helpful for you! 😄
Your use case can easily be solved using Regular Expressions.
This is the simplest regex that matches the whole filename you want to match:
^.*-FE-.*\.xml$
I created this example on regex101.com so you can play with the regex and different example file names and see which will match and which not.
It also explains the syntax and matching parts of the regular expression.
In case you want to do more with the numbers and characters that are part of the filename you can use Named Capturing Groups that are
able to extract certain parts of the name and make them available for further processing steps (e.g. as part of the drive path or file…