Your regex is greedy; it will match everything up to the last }
it can find.
Try this:
String re = "\\{\"chkin.*?\\}";
Adding the ?
makes it reluctant, which matches as little as possible.
6
solved regex matching curly braces in java inside very large html file [duplicate]