Regular Expressions 101

Sponsors

Library entries

0
pcre2

Test mail

Email test
Submitted by anonymous - 14 days ago
0
java

Verify email

Regex for email
Submitted by anonymous - 12 days ago
0
pcre2

Celular Brasil

Validar celular do Brasil
Submitted by Paulo Neves - 10 days ago
0
pcre2

hidrologia

qualidade
Submitted by anonymous - 6 days ago
0
pcre2

InputInteger

InputInteger
Submitted by anonymous - 6 days ago
0
pcre2

matches 4 or 6 or 8 digit which might be otp

test
Submitted by test - 4 days ago
0
pcre2

Sports Release Regex attempt #1

Yes. Its a thing.
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 - 18 days ago