Regular Expressions 101

Community Patterns

Your search did not match anything

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
"(?:[^"\\]|\\(?:[^u]|u[[:xdigit:]]{4}))*"|true|false|null|\-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?|\[\s*(?:(?:(?R)\s*,\s*)*(?R))?\s*\]|{\s*(?:(?:(?R)\s*:\s*(?R)\s*,\s*)*(?:(?R)\s*:\s*(?R)))?\s*}
/
gm

Description

Valid Syntax: 1 23.5 -13.2 -3.5e-23 false true null [ 1, 2, 3 ] { "A": 1, true: [], 8: 1 } {} Invalid syntax: [1,]

Submitted by anonymous - 19 hours ago