Regular Expressions 101

Community Patterns

0

url-selection

PCRE2 (PHP >=7.3)
url-selection
Submitted by anonymous - 2 years ago
0

FindQuoteDiv

PCRE2 (PHP >=7.3)
FindQuoteDiv
Submitted by anonymous - 2 years ago
0

URL

PCRE2 (PHP >=7.3)
URL
Submitted by anonymous - 2 years ago
0

Look Ahead

PCRE2 (PHP >=7.3)
Look Ahead
Submitted by anonymous - 2 years ago
0

homework4

PCRE2 (PHP >=7.3)
homework 4
Submitted by Eric Neuwirth - 2 years ago

Get path from any text

15

Regular Expression
Recommended
PCRE2 (PHP >=7.3)

/
(?<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]+[\/\\]?)*"
/
g

Description

Loading markdown...
Submitted by nitrateag - a year ago
(Last modified 7 months ago)