Regular Expressions 101

Library entries

0
pcre2

exclude square brackets

exclude square brackets
Submitted by tarek - a day ago
0
pcre2

YouTube link parser

Validate an URI to YouTube video.
Submitted by anonymous - 4 days ago
0
javascript

test

test
Submitted by anonymous - 7 days ago

Get path from any text

Vote

7

Regular Expression
pcre2

/
(?<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 - 4 months ago