Community Patterns

Community Library Entry

0

Regular Expression
Created·2023-07-06 11:47
Flavor·ECMAScript (JavaScript)

/
(")?([^{:"]+)(")?(: )(")?([^,}"]+)(")?(, |}+)
/
g
Open regex in editor

Description

This Regex allows to add double-quotes to a JSON string that is missing them. It assumes we have a space after the ":" and also after the ",".

Submitted by anonymous