I have a Json file containing text as such:
{
title1: {
x: "abc",
y: "def"
} ,
title2:{
x: "{{abc}}",
y: "{{def}}"
},
}
I want to first get the title1 title2 ,... groups. And after that, for each group, I want to get the x:..., y:... parts. I try to do this in two steps. For the first step, I used the following regexp:
[\s\S]*:\s*{(((?!}\s*,)[\s\S])*)
I am trying to say that find :
followed by optional white space and then {
. Then, continue until you see }
followed by optional whitespace and ,
. But it finds the whole text as a match instead of title1 and title2 parts separately. What is wrong with it?