Community Patterns

Community Library Entry

1

Regular Expression
Created·2015-08-24 14:15
Flavor·PCRE (Legacy)

/
\A((?:[^{}]++|\{(?-1)\})*)+\Z
/
Open regex in editor

Description

The string '{}' is valid while '{{}' is invalid as well as '}{'.

Now, is this one valid: '{{{{v{a{l{{i{d or }i}}}n}v}}al}i}d?' ?

Submitted by nowox