Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^([^()[\]{}<>]*)(\(((?1)(?2)*)*\)|\[(?3)*\]|\<(?3)*\>|{(?3)*\})(?1)$
/

Description

Check the correct order of the brackets (),<>,{},[]

Submitted by Korniychuk Anton<ancor.dev@gmail.com> - 8 years ago