I have this JSON file in this format;
[{
"item-id" : "0",
"item-name" : "Dwarf remains",
"item-examine" : "The body of a Dwarf savaged by Goblins.",
"shop-value" : "0.0",
"low-alch" : "0.0",
"high-alch" : "0.0",
"stab-bonus" : "0",
"slash-bonus" : "0",
"crush-bonus" : "0",
"magic-bonus" : "0",
"ranged-bonus" : "0",
"stab-defence" : "0",
"slash-defence" : "0",
"crush-defence" : "0",
"magic-defence" : "0",
"ranged-defence" : "0",
"strength-bonus" : "0",
"prayer-bonus" : "0",
},
{
"item-id" : "1",
"item-name" : "Toolkit",
"item-examine" : "Good for repairing a broken cannon.",
"shop-value" : "0.0",
"low-alch" : "0.0",
"high-alch" : "0.0",
"stab-bonus" : "0",
"slash-bonus" : "0",
"crush-bonus" : "0",
"magic-bonus" : "0",
"ranged-bonus" : "0",
"stab-defence" : "0",
"slash-defence" : "0",
"crush-defence" : "0",
"magic-defence" : "0",
"ranged-defence" : "0",
"strength-bonus" : "0",
"prayer-bonus" : "0",
}]
But with 25 000 entries
But in the file there is something wrong;
"prayer-bonus" : "0",
should be
"prayer-bonus" : "0"
How can i use regex or whatever to only replace the last bit?
Im using java.
By the way: the value is not always "0"
So how can i have it be a wildcard so it replaces all ?