I need to extract just the filename (no file extension) from the following path....
\\\\my-local-server\\path\\to\\this_file may_contain-any&character.pdf<
also one more for file in dir and root
^(.*\\)?(.*)(\..*)$
for file in dir
Full match 0-17 `\path\to\file.ext` Group 1. 0-9 `\path\to\` Group 2. 9-13 `file` Group 3. 13-17 `.ext`
for file in root
Full match 0-8 `file.ext` Group 2. 0-4 `file` Group 3. 4-8 `.ext`