Regular Expressions 101

Sponsors

Library entries

1
golang

Siebel Id

no description available
Submitted by anonymous - 6 years ago
1
pcre2

Custom IFrame SRC Grabber

no description available
Submitted by Moep - 2 years ago
1
pcre2

MyRegEx

no description available
Submitted by anonymous - 2 years ago
1
pcre2

Dutch mobile phone number

no description available
Submitted by anonymous - 2 years ago
1
java

Match all numbers

Match all numbers from a string.
Submitted by VS - 2 years ago
1
java

Sınıfları Tek Tek seçme

za
Submitted by anonymous - 2 years 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 - 3 months ago