regex:file_path
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
regex:file_path [2021/05/20 10:19] – peter | regex:file_path [2021/05/20 10:32] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Regex - File Path ====== | ====== Regex - File Path ====== | ||
- | ===== Windows ===== | + | [[Regex: |
- | <code bash> | + | [[Regex:File Path:Drive letter and UNC paths|Drive letter and UNC paths]] |
- | (\\\\([a-z|A-Z|0-9|-|_|\s]{2, | + | |
- | </ | + | |
- | <WRAP info> | + | [[Regex:File Path:Windows|Windows]] |
- | **NOTE:** Disallows a few characters: **< | + | |
- | </ | + | |
- | ---- | ||
- | <code bash> | ||
- | ^((?: | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | <code bash> | ||
- | ^[a-zA-Z]: | ||
- | </ | ||
- | |||
- | <WRAP info> | ||
- | **NOTE: | ||
- | |||
- | * **< | ||
- | |||
- | * **< | ||
- | |||
- | * **< | ||
- | |||
- | * **< | ||
- | |||
- | All of that is is repeated 0 to many times, with the last backslash optional. | ||
- | |||
- | For many use cases it may be best to restrict the path length to 256 characters. | ||
- | |||
- | * To do so, replace < | ||
- | </ | ||
regex/file_path.1621505998.txt.gz · Last modified: 2021/05/20 10:19 by peter