Page 1 of 1

Regular Expression question

Posted: Tue Jul 03, 2018 9:33 am
by GBDickinson
I'm trying to build a regular expression for a file monitor, and I don't seem to be having much luck. I need an expression that will return any file paths that have the string "OUTBOX" in them, and that end in either "csv", "txt", or "ack". I used the site https://regexr.com/ to build this expression:
Code: Select all
^.*OUTBOX.*(ack|txt|csv)$
But my monitor still doesn't return any files. Am I using the correct syntax for GoAnywhere?

Re: Regular Expression question

Posted: Wed Jul 11, 2018 9:48 am
by Support_Josh
You can achieve this by using a recursive Monitor that points at the root directory for the subset of folders in question. This will get the list of all files passed from the monitor to the Project. Once you have passed the file list to the Project via the Monitor, you can filter results on specific directories using logic tasks. The ${Contains()} function inside of the Project will determine if the file list contains any files in a specific folder.