Regular Expressions 101

Sponsors

Library entries

0
pcre2

php socket

validates a php socket string
Submitted by anonymous - 11 days ago
0
pcre2

Verify email

test email
Submitted by Digimusen - 11 days ago
0
golang

S3 Path with ending .json

S3 Path with ending .json
Submitted by Sowmith - 10 days ago
0
pcre2

Indain phone number

Indain phone number
Submitted by anonymous - 9 days ago
0
pcre2

Validate url data descriptor

For internal purposes
Submitted by Daniel Bañobre - 9 days ago
0
pcre2

cloze_list_depth_1

Submitted by anonymous - 9 days ago
0
pcre2

day of week sorter type thingy

rando desc
Submitted by anonymous - 7 days ago
0
pcre2

Visa card regex

Visa card regex
Submitted by anonymous - 5 days ago
0
pcre2

MAC address

MAC address supporting various formats
Submitted by anonymous - 5 days ago
0
pcre2

首行首个单词

匹配首行首个单词
Submitted by anonymous - 4 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 - 6 days ago