I have been doing some searching for a regex that can be used as a rule to disallow users entering windows file paths without escaping the "\". So far I have found this expression
[^\\]*$
However, this fails for the following:
C:\\Program Files\\testing
By fails I mean that it does not validate this string. Any help would be greatly appreciated, and yes I am bound to using regex.