Regular Expressions 101

Library entries

Get path from any text

Vote

0

Regular Expression
pcre2

/
((?:(?# path without "" )(?<opening>(?# 'C:/', '//' or '%VariableWindows%')(?<montage>\b[a-zA-Z]:[\/\\])|(?:[\/\\][\/\\])|(?:%\w+%[\/\\]?))(?:(?# directory btw // )[^\/\\<>:"|?\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

Description

Loading markdown...
Submitted by nitrateag - 2 months ago