Windows Folder Path Regular Expression

A regular expression to match the path of a directory in Windows.

/^[a-zA-Z]:\\(?:\w+\\?)*$/

Linux Hidden File Path Examples:

  • C:\\Users\\Administrator\\Desktop
  • E:\\m\\

See Also:

Regex Is Copied!