Regular Expressions 101

Community Patterns

7

CSS Import

Python
no description available
Submitted by anonymous - 10 years ago
9

domain - host

Python
no description available
Submitted by anonymous - 8 years ago
8

repeat group match

Python
no description available
Submitted by anonymous - 9 years ago
10

entity

Python
no description available
Submitted by anonymous - 8 years ago
3

date time

Python
1/Jul/2013 03:27:12
Submitted by himel - 10 years ago
2

postgesql

Python
no description available
Submitted by anonymous - 9 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)