I am trying to parse the following string to extract final destination path and name (highlighted in RED)
00:00:00.437 - ToolId 140: \\DRIVE\test\test.sql|67 records were read from "\\DRIVE\test\test.xls" ('DropDown$')
00:00:00.927 - ToolId 228: \\DRIVE\test1\test1.sql|69 records were read from "\\DRIVE\test1\test1.xls" ....
00:00:00.373 - ToolId 273: \\DRIVE\test2\test2.sql|67 records were read from "\\DRIVE\test2\test2.xls" ............................
Any leads will be highly appreciated.
Thank you
@khanp27 I like to use www.regex101.com to help me parse out string. You can use this expression in the RegEx tool with the Parse function to get what you want:
^.*\s\"(.*)\".*
In addition to @flying008 @Prometheus ' work, you can also use:
(\\\\[^|]+)
Ah sorry my bad, you wanted the .xls and not .sql. Please use this instead:
(\\\\[^\|]+(?=\"))