Regular Expressions 101

Sponsors

Library entries

1
pcre2

Brainfuck Regex

Regex to select every brainfuck symbol.
Submitted by rex0515 - 9 months ago
1
pcre2

Github URI Validator

Validate Github URI
Submitted by Shoaiyb Sysa - 9 months ago
1
pcre2

ticker but not EFS

ticker but not EFS
Submitted by anonymous - 7 months ago
1
pcre2

Strong Password

Support JS and PHP
Submitted by jodi@nusantarabetastudio.com - 7 months ago
1
pcre2

CSV quotation mark

See quotes that are not delimiters
Submitted by anonymous - 7 months ago
1
pcre2

order by field and direction

order by field and direction
Submitted by anonymous - 6 months ago
1
java

Rick Roll

Matches chorus of Never Going to Give You Up
Submitted by Stephen Battista - 6 months 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 - 2 months ago