Regular Expressions 101

Sponsors

Library entries

2
pcre

NSU ID Card Checker

no description available
Submitted by anonymous - 5 years ago
2
pcre

Match "A B C" where A+B=C (final version)

no description available
Submitted by anonymous - 4 years ago
2
pcre

BEM

CSS Coding Guideline BEM (Block Element Modifier)
Submitted by anonymous - 2 years ago
2
pcre

手机正则

no description available
Submitted by anonymous - 2 years ago
2
pcre

Resolvers

APD SFs too general
Submitted by anonymous - 2 years ago
3
pcre

Get Nth value (3 times)

capture Nth character from string, 3 times
Submitted by K. - 9 years ago
3
pcre

UUID

no description available
Submitted by Jason - 8 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 - 14 days ago