Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
((?:(?# path without "" )(?<opening>(?# 'C:/', '//', '//./<UNC/C:>', '//?/<UNC/C:>' or '%VariableWindows%')(?<UNCPrefix>[\/\\][\/\\][?.][\/\\](?:UNC[\/\\])?)?(?<montage>\b[a-zA-Z]:[\/\\])|(?:(?:(?&UNCPrefix))|(?:[\/\\][\/\\](?!(?&montage))))|(?:%\w+%[\/\\]?))(?:(?# directory btw // )[^\/\\<>:"|?\n\r ][^\/\\<>:"|?\n\r]*(?<![ ])[\/\\])*(?:(?#we search for fileName only if next character is pathFriendly)(?=[^\/\\<>:"'|?\n\r;, ])(?:(?#name file ? dir ?)(?:[^\/\\<>:"|?\n\r;, .](?: (?=[\w\-]))?(?:\*(?!= ))?(?!(?&montage)))+)?(?:(?#extention)\.\w+)*))|(?:(?# path quoted "" or '' )["'](?&opening)(?=.*?["'])(?:[^\/\\<>:'"|?\n\r]+[\/\\]?)+?["']))
/
g
Input 1
\\LOCALHOST\c$\temp\test-file.txt" @"c:\temp\test-file.txt", @"\\127.0.0.1\c$\temp\test-file.txt", @"\\LOCALHOST\c$\ temp\test-file.txt", @"\\.\c:\temp\test-file.txt", @"\\?\c:\temp\est-file.txt", @"\\.\UNC\LOCALHOST\c$\temp\test-file.txt", @"\\127.0.0.1\c$\temp\test-file.txt" --------------------------- Tentative d'accès à C:\Users\tpgz4017\App - Data\Local\Temp\tempShapeFile_CrossWave Calibration Zones - Atoll CrossWave Model.shx après sa fin. --------------------------- file:///C:/Users/Downloads/20220516_32289275_1049383.pdf file://p-eco2.rd.fr/vol_H0037_01$/599/livraison/20220516_32289275_1049383.pdf --> couper les path apres le '\ ', meme que on est arrivé au fichier c:\temp\test-file.txt", \\127.0.0.1\c$\temp\test-file.txt", \\LOCALHOST\c$\ temp\test-file.txt", \\LOCALHOST\c$ \temp\test-file.txt", \\.\c:\temp\t\est-file.txt", \\?\c:\temp\test-file.txt", \\.\UNC\LOCALHOST\c$\temp\test-file.txt", \\?\UNC\ServerName\ temp\test-file.txt", \\127.0.0.1\c$\temp\test-file.txt" \\?\se
Extraction
\\LOCALHOST\c$\temp\test-file.txt" @"c:\temp\test-file.txt", @"\\127.0.0.1\c$\temp\test-file.txt", @"\\LOCALHOST\c$\ temp\test-file.txt", @"\\.\c:\temp\test-file.txt", @"\\?\c:\temp\est-file.txt", @"\\.\UNC\LOCALHOST\c$\temp\test-file.txt", @"\\127.0.0.1\c$\temp\test-file.txt" --------------------------- Tentative d'accès à C:\Users\tpgz4017\App - Data\Local\Temp\tempShapeFile_CrossWave Calibration Zones - Atoll CrossWave Model.shx après sa fin. --------------------------- file:///C:/Users/Downloads/20220516_32289275_1049383.pdf file://p-eco2.rd.fr/vol_H0037_01$/599/livraison/20220516_32289275_1049383.pdf --> couper les path apres le '\ ', meme que on est arrivé au fichier c:\temp\test-file.txt", \\127.0.0.1\c$\temp\test-file.txt", \\LOCALHOST\c$\ temp\test-file.txt", \\LOCALHOST\c$ \temp\test-file.txt", \\.\c:\temp\t\est-file.txt", \\?\c:\temp\test-file.txt", \\.\UNC\LOCALHOST\c$\temp\test-file.txt", \\?\UNC\ServerName\ temp\test-file.txt", \\127.0.0.1\c$\temp\test-file.txt" \\?\se