Regular Expressions 101

Community Patterns

0

Kendala

PCRE2 (PHP >=7.3)
kendala
Submitted by rey - 2 years ago
0

Match color string

PCRE2 (PHP >=7.3)
Match color string
Submitted by EZ - 2 years ago
0

web validation

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

web validation

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

css var regex

PCRE2 (PHP >=7.3)
css var regex
Submitted by anonymous - 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)