Regular Expressions 101

Community Patterns

123...6

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^\s+|\s+$|\s*(,|:|\[|\]|{|})\s*
/
gm

Description

transform formatted JSON to one line by removing unneeded spaces.

Submitted by anonymous - 13 days ago (Last modified 13 days ago)