Regular Expressions 101

Sponsors

Library entries

-2
pcre

[A-Z]+[a-z]{1,2}[0-9]*

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

A masz!

no description available
Submitted by Ja - 8 years ago
-2
pcre

failed attempt

no description available
Submitted by DynV - 8 years ago
1
pcre

Test Listing Parser

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

Ukazka

no description available
Submitted by anonymous - 8 years ago
1
pcre

Task 2, part 1

Finds all source numbers in square brackets
Submitted by Kovalev Evgeny - 8 years ago
4
pcre

Task 1

Finds a happy smile, except sad one
Submitted by Kovalev Evgeny - 8 years ago
1
pcre

Task 1

no description available
Submitted by Kovalev Evgeny - 8 years ago
1
pcre

srt

no description available
Submitted by anonymous - 8 years ago
1
pcre

example regex

no description available
Submitted by anonymous - 8 years ago
-9
pcre

test

no description available
Submitted by test - 8 years ago
1
pcre

match up to -

no description available
Submitted by anonymous - 8 years ago
1
pcre

a^n b^n

no description available
Submitted by Oleksandr Sochka - 8 years ago
1
pcre

Divisible by 3 numbers

no description available
Submitted by Oleksandr Sochka - 8 years ago
1
pcre

Phone numbers matcher

no description available
Submitted by Oleksandr Sochka - 8 years ago

Matching balanced parens, brackets, and braces

Vote

5

Regular Expression
pcre

/
# match a body pattern alone on a line ^\g<body>$ # we'll use (?<name>...){0} to define the pattern \g<name> # without having to match the pattern at the current position # a body pattern matches (?<body> # a sequence of (?: [^\[\]{}()\n] # non-delimiters | \g<parens> # parenthesized pattern | \g<square_brackets> # bracketed pattern | \g<curly_braces> # braced pattern )* ){0} # a parenthesized pattern matches (?<parens> \( # an open paren \g<body> # a valid body \) # a close paren ){0} # a bracketed pattern matches (?<square_brackets> \[ # an open square bracket \g<body> # a valid body \] # a close square bracket ){0} # a braced pattern matches (?<curly_braces> \{ # an open curly brace \g<body> # a valid body \} # a close curly brace ){0}
/
gmx

Description

Loading markdown...
Submitted by Noah Luck Easterly - 9 years ago