Regular Expressions 101

Sponsors

Library entries

0
pcre2

asdf

ghjk
Submitted by anonymous - 3 hours ago
0
pcre2

/Host: (.*?)<br>/gu

1
Submitted by anonymous - 5 hours ago
0
pcre2

Partial Date

Partial date
Submitted by anonymous - 21 hours ago
0
pcre2

regex-input-number

regex-input-number
Submitted by me - a day ago
0
pcre2

find abc in string

first test
Submitted by anonymous - a day ago
0
pcre2

simulate to event

simulate to event
Submitted by anonymous - a day ago
0
pcre2

simulate to event

simulate to event
Submitted by anonymous - a day ago
0
pcre2

simulate to event

simulate to event
Submitted by anonymous - a day ago
0
pcre2

Remove Hatena blog keyword

Remove Hatena blog keyword
Submitted by anonymous - 2 days ago
0
pcre2

嵌入条件

嵌入条件
Submitted by anonymous - 2 days ago
0
pcre2

Ipv4 validation

regex for ip validation
Submitted by Amper - 3 days ago
0
pcre2

Split The Phone Numbers

Split The Phone Numbers
Submitted by anonymous - 3 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 - a month ago