Regular Expressions 101

Sponsors

Library entries

0
pcre

EAN-13 nummer

no description available
Submitted by anonymous - 3 years ago
0
pcre

match page from url

no description available
Submitted by anonymous - 3 years ago
0
pcre

Registration Group

no description available
Submitted by anonymous - 3 years ago
0
pcre

DEL1tokenENDDEL1

no description available
Submitted by anonymous - 3 years ago
0
pcre

rs-reg

personal patterns
Submitted by anonymous - 3 years ago
0
pcre

UK Postcode

no description available
Submitted by anonymous - 3 years ago
0
pcre

Quantity/unit breakdown for WHMCS

no description available
Submitted by anonymous - 3 years ago
0
pcre

Automaton on p.996 of Cormen

no description available
Submitted by anonymous - 3 years ago
0
pcre

(ObjectDatabase|GSRoot)Test\.exe

no description available
Submitted by anonymous - 3 years ago

match specific functions

Vote

0

Regular Expression
pcre

~
(?(DEFINE) # Start of definitions (?P<str_double_quotes> (?<!\\) # Not escaped " # Match a double quote (?: # Non-capturing group [^\\] # Match anything not a backslash | # Or \\. # Match a backslash and a single character (ie: an escaped character) )*? # Repeat the non-capturing group zero or more times, ungreedy/lazy " # Match the ending double quote ) (?P<str_single_quotes> (?<!\\) # Not escaped ' # Match a single quote (?: # Non-capturing group [^\\] # Match anything not a backslash | # Or \\. # Match a backslash and a single character (ie: an escaped character) )*? # Repeat the non-capturing group zero or more times, ungreedy/lazy ' # Match the ending single quote ) (?P<brackets> \( # Match an opening bracket (?: # A non capturing group (?&str_double_quotes) # Recurse/use the str_double_quotes pattern | # Or (?&str_single_quotes) # Recurse/use the str_single_quotes pattern | # Or [^()] # Anything not a bracket | # Or (?&brackets) # Recurse the bracket pattern )* \) ) ) # End of definitions # Let's start matching for real now: _n? # Match _ or _n \s* # Optional white spaces (?P<results>(?&brackets)) # Recurse/use the brackets pattern and put it in the results group
~
sxg

Description

Loading markdown...
Submitted by anonymous - 2 years ago