Regular Expressions 101

the correct order of the brackets

Open Workspace
  • PCRE (Legacy)
  • Match
0

Regular Expression

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

Description

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

Submitted by Korniychuk Anton<ancor.dev@gmail.com>