0
Under review

What is the regex syntax to include a specific folder name when creating a bundle?

Jaime Zuniga 3 years ago in Home Portal / Classic Projects with CAT integration updated by Łukasz Kaleta (Senior Customer Success Manager) 3 years ago 2

I have a folder structure which contains many subfolders, and in each folder the filename is the same, but I only need to import files that are in specific folders.


For example, consider if I had 3 folders called EN, DE and FR, and they all contained files named file.txt. So, I am looking to create a bundle that only finds file.txt when it is in the EN folder, The rest can be placed in the Remaining files bundle.


I can write a regex that finds file.txt, but I am having a problem figuring out the correct syntax to include the folder name.


Any ideas?

Jaime


In case of Regex expressions there are many possibilities. You need to specify a path that should match the pattern and a few patches that should not match the pattern. It is difficult to answer such general question. For example the expression that can match the patch:

/home/.../.../.../EN/.../.../file.txt

Would be: /(.+)\/EN\/(.+)\/(.+).txt/

But it should be tested on more example patches