[Solved] regex matching curly braces in java inside very large html file [duplicate]

[ad_1]

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

[ad_2]

solved regex matching curly braces in java inside very large html file [duplicate]