Regular Expressions 101

Sponsors

Library entries

0
pcre2

Rules

Rules
Submitted by anonymous - 17 hours ago
0
pcre2

Host Regex

Get any hostname
Submitted by anonymous - 3 days ago
0
pcre2

Phone (rus)

Russian phone number
Submitted by anonymous - 5 days ago
0
pcre2

TESTO denro tag

r
Submitted by anonymous - 5 days ago
0
pcre2

Unique graphql pagination update

Unique graphql pagination update
Submitted by Amos - 5 days ago
0
pcre2

스마트스토어 필터링

ㅌㅌ
Submitted by anonymous - 5 days ago
0
pcre2

S/O 73225392

Replaces one style of markdown image with another
Submitted by anonymous - 6 days ago
0
pcre2

asdasd

dasdasd
Submitted by anonymous - 6 days ago
0
pcre2

cdn匹配图片

保留
Submitted by anonymous - 6 days ago
1
java

IP Address

(^([0-9]{2,3}.)([0-9]{2,3}.)([0-9]{2,3}.)([0-9]{2,3})$)
Submitted by anonymous - 7 days ago

Get path from any text

Vote

5

Regular Expression
pcre2

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