I've got a workflow output that output's full path's combined with some extra data in 1 line.
//server/filelocation\workflowfilename.yxmd - randomnumbers \csv_input.csv
I'm trying to use some regex to extract the .yxmd part of this long string but i'm getting stuck on this.
the workflow names are some what different but the string always are build up with
filelocation\workflowname.yxmd -
The easy part is to extract filenames that don't have the same name as the folder there are placed in and let regex start at the / character.
But some of the workflow names are the same as some folder names.
like //server/01Sales\01Sales.yxmd - extra data.
is there a way to only extract the 01Sales.yxmd with regex?
Solved! Go to Solution.
Hi @MartWClimber ,
Maybe you can try the following expression in a RegEx tool?
\\(.+\.yxmd)
Thanks,
Angelos
Some filenames can contain periods/fullstops. I would use,
REGEX_Replace([Field1], '.*\\(.*\.yxmd).*', '$1')
Or if you can't anticipate whether you have forward slashes or backslashes,
REGEX_Replace([Field1], '.*[/\\](.*\.yxmd).*', '$1')
had to mod the answers a bit but it works now. some of the workflow filenames had some more stuff attached like server\folder\/subfolder/workflow.yxmd - etc or server\folder\/subfolder/subfolder/workflow.yxmd.
so after the regex I used a text to column and formula tool to get rid of the subfolders. works great thanks you all
Happy to help : ) @MartWClimber
Cheers and have a nice day!