User Tools

Site Tools


regex:file_path:drive_letter_paths

Regex - File Path - Drive letter paths

Check whether a string looks like a valid path to a folder or file on the Microsoft Windows operating system.

Drive letter paths

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

NOTE: Case insensitive.


\A
[a-z]:\\                    # Drive
(?:[^\\/:*?"<>|\r\n]+\\)*   # Folder
[^\\/:*?"<>|\r\n]*          # File
\Z

NOTE: Free-spacing, case insensitive.


regex/file_path/drive_letter_paths.txt · Last modified: 2021/05/20 10:27 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki