I am currently looking for a regex that can help validate a file path e.g.:
C:\test\test2\test.exe
I am currently looking for a regex that can help validate a file path e.g.:
C:\test\test2\test.exe
I know this is really old... but expanding on @agent-j's response I've added named groups, and support for period characters.
^(?<ParentPath>(?:[a-zA-Z]\:|\\\\[\w\s\.]+\\[\w\s\.$]+)\\(?:[\w\s\.]+\\)*)(?<BaseName>[\w\s\.]*?)$
I've saved this at Regexr