Regular Expressions 101

Sponsors

Library entries

0
golang

super regex

Get every word ending with dot using Regex/VBA
Submitted by anonymous - 9 days ago
0
pcre2

Date time ISO_8601 Pattern

credits to Sayooj V R
Submitted by anonymous - 10 days ago
0
pcre2

routes

routes
Submitted by anonymous - 10 days ago
0
java

Identifier Regex

Regex for identifiers
Submitted by anonymous - 11 days ago
1
pcre

Only if before

Only if needle is before target
Submitted by anonymous - 11 days ago
0
pcre2

GS1-128 and RegEx

Parse the 3 groups of a GS1-128 Barcode
Submitted by Mike D - 12 days ago
0
javascript

Currency

Currency
Submitted by jerryd - 12 days ago
0
pcre2

Dafne

.NSO.HORDIN_XMLDAFNEV..xml
Submitted by Dorino - 12 days ago
0
pcre2

12 hours regex

Define hour at 12 hours
Submitted by anonymous - 12 days ago
0
pcre2

Hour regex

Define 24 hour format
Submitted by anonymous - 12 days ago
0
pcre2

Model Code validator

Check the modelCode for iOS/iPadOS devices
Submitted by ppeelen - 13 days ago
0
pcre2

regex

remove pun
Submitted by anonymous - 13 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 - 3 months ago