Regular Expressions 101

Sponsors

Library entries

1
pcre

Phone numbers matcher

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

г.москва

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

decimal numbers

match decimal numbers with sign
Submitted by mariano_dm - 8 years ago
-2
pcre

Filter IP from beggin of log

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

the the

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

help me please

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

Find common version names in filenames

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

code bracket parser

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

need help

no description available
Submitted by sachin - 8 years ago
-3
pcre

test2

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

test

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

Comments in XML document

Match comments in a XML document.
Submitted by Jared Rummler - 8 years ago
1
pcre

match hyphen between quotes

no description available
Submitted by cetanu - 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