← GalleryGet path from any text✨ Emoji Combos/(?<opening>\b(?<montage>[a-zA-Z]:[\/\\])|[\/\\][\/\\](?<!http:\/\/)(?<!https:\/\/)(?>[?.][\/\\](?:[^\/\\<>:"|?\n\r ]+[\/\\])?(?&montage)?|(?!(?&montage)))|%\w+%[\/\\]?)(?:[^\/\\<>:"|?\n\r ,'][^\/\\<>:"|?\n\r]*(?<![ ,'])[\/\\])*(?:(?=[^\/\\<>:"'|?\n\r;, ])(?:(?:[^\/\\<>:"|?\n\r;, .](?: (?=[\w\-]))?(?:\*(?!= ))?(?!(?&montage)))+)?(?:\.\w+)*)|(?:'(?&opening)(?=.*'\W|.*'$)(?:[^\/\\<>:'"|?\n\r]+(?:'(?=\w))?[\/\\]?)*')|"(?&opening)(?=.*")(?:[^\/\\<>:"|?\n\r]+[\/\\]?)*"/gPCRE2+193 years ago✓ Pre-loaded
About this regex
Matches file paths embedded in arbitrary text across Windows, Unix, and UNC formats. Supports drive letters (C:\), forward/backslash paths, environment variables (%APPDATA%\), and quoted paths. Excludes URLs (http/https) and filters out invalid filename characters. Useful for parsing logs, extracting file references from documents, or finding paths in configuration snippets.