Instantly share code, notes, and snippets.
From https://regex101.com/r/nzqeoN/1
/\s(?=[\s":{}])/g
Warning, this regex does not work for every json strings, it:
[ ... ]
,
:
{
}
Sorry, something went wrong.
Warning, this regex does not work for every json strings, it:
[ ... ]
, nor commas,
:
,{
and}