Pattern matching in Javascript
I want to make pattern which matches the string
{"ABC":["A1","X30","2","A2","X31","3","A3","X90","9"],"XYZ":["A1","X31","2","A3","X40","7"]}
I have used regex pattern
{("["A-Z0-9"]+":["[A-Z0-9]+","[A-Z0-9]+","[0-9]+"],)+}
but it doesn't match properly.
Every array length is multiple of 3 only and first & second element in pair of 3 consist of [A-Z0-9] only and third element consist of [0-9] only.
For example: "A1","X30" (first two element) & "2"(third element) similarly after 3 elements this pattern repeats "A2","X31" as first and second element and "3" as third element.
test pattern-1:
{"ABC":["A1","X30","2"],"XYZ":["A1","X31","2","A3","X40","7"]}
test pattern-2:
{"ABC":["A1","X30","2","A2","X31","3","A3","X90","9"],"XYZ":["A1","X31","2","A3","X40","7"]}
test pattern-3:
{"ABC":["A1","X30","2"]}