I want to match
$${}$$
Content in
str is complicated. As follows, I want to find out the contents of all the double $$curly braces and put them into an array. What should I do?
[{"field_id":"DM0002","field":"$${gender}$$","weight":"0.5","data_type":"1","condition_scores":[{"condition":{"type":"and","options":[{"option":"gt","value":"$${gender}$$","type":"word"},{"option":"gte","value":"$${userName}$$","data_type":"","type":"word","field_id":"","filed":""}]},"score":"50"},{"condition":{"type":"and","options":[{"option":"gt","value":"$${gender}$$","data_type":"","type":"word","field_id":"","filed":""},{"option":"lt","value":"$${gender}$$","data_type":"","type":"word","field_id":"","filed":""}]},"score":"80"}]}]
JSON is as follows
[
{
"field_id":"DM0002",
"field":"$${gender}$$",
"weight":"0.5",
"data_type":"1",
"condition_scores":[
{
"condition":{
"type":"and",
"options":[
{
"option":"gt",
"value":"$${gender}$$",
"type":"word"
},
{
"option":"gte",
"value":"$${userName}$$",
"data_type":"",
"type":"word",
"field_id":"",
"filed":""
}
]
},
"score":"50"
},
{
"condition":{
"type":"and",
"options":[
{
"option":"gt",
"value":"$${gender}$$",
"data_type":"",
"type":"word",
"field_id":"",
"filed":""
},
{
"option":"lt",
"value":"$${gender}$$",
"data_type":"",
"type":"word",
"field_id":"",
"filed":""
}
]
},
"score":"80"
}
]
}
]
try to use
yourself./^\$\$\{(\w{1,10})\}\$\$$/.exec("$${4555}$$222$${4555555788}$$")
match is not successful, find the solution