I need help with this parse in the RegEx Tool. I want to extract the department name from the filepath. Thank you!
Filename: | Desired Result: |
Food Safety Self Audit - Bakery(1-733) | Bakery |
Food Safety Self Audit - Grocery(1-454) | Grocery |
Food Safety Self Audit - Meat(1-867) | Meat |
Food Safety Self Audit - Produce(1-857) | Produce |
Food Safety Self Audit - Seafood(1-342) | Seafood |
Solved! Go to Solution.
Hello @KmbrlyPC ,
Try the following soltion:
Regex_Replace([Field1],'(.*\s\-\s)(.*)(\(.*\))','$2')
Regards
It worked, thank you!
I have a few instances in which the Department Name that I want to parse from the file path is two words. For example "Prep Foods". For these two word departments, using .+\-\s(\w+)\(.+ is not working.
It works and is bringing in all the team names, thank you!