Back to Library
Files

Windows File Path

Matches a Windows file path (drive letter + path).

Pattern
^[a-zA-Z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$

Test Cases

C:\Users\Data\file.txt Match

Try it Live

Test and customize this pattern in our interactive editor

Open in Editor