Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^<()(?R){2}>\z|\1\Q^<()(?R){2}>\z|\1\Q
/

Description

It matches and only matches this regex, including the delimiters. It could be 4 bytes shorter if <> are used as the delimiters instead. From Programming Puzzles & Code Golf.

Submitted by jimmy23013 - 8 years ago