I\'m implementing some kind of parser and I need to locate and deserialize json object embedded into other semi-structured data. I used regexp:
Thanks to @Sanjay T. Sharma that pointed me to "brace matching" because I eventually got some understanding of greedy expressions and also thanks to others for saying initially what I shouldn't do. Fortunately it turned out it's OK to use greedy variant of expression
\\{\s*title.*\\}
because there is no non-JSON data between closing brackets.