Regular Expressions 101

Community Patterns

Get keywords and value from json.

0

Regular Expression
PCRE (PHP <7.3)

/
(?<! {5})(\".+?\": [^\\[{\n]+(?:,|\n))|(?<! {5})(".+?": {[\S\s]+?},)|(?<! {5})(".+?": \[[\S\s]+?\],)
/
g

Description

Group 1: All properties without [ ], { } Group 2: Properties with class Group 3: Properties with array

Submitted by anonymous - 4 years ago