Windows File Path Regular Expression

Category: URI | Views Total: 34 views

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

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

Windows File Path Examples:

  • C:\\Users\\Administrator\\Desktop\\chrome.link
  • E:\\m\\vscode.exe

See Also:

Rate This Regex
Sending
User Review
0 (0 votes)

Leave a Reply