In .NET is there a function that tests if a string is syntactically a correct path? I specifically don't want it to test if the path actually exists.
my current take on this is a regex:
([a-zA-Z]:|\\)?\\?([^/\\:*?"<>|]+[/\\])*[^/\\:*?"<>|]*
matches:
c:\
bbbb
\\bob/john\
..\..\
rejects:
xy:
c:\\bob