Spending two days in a lab can easily save you up to one hour reading literature
Hi! Welcome here. Like, literally, any other question that asks "hey, I want to parse this non-regular language, e.g. JSON, YAML, XML, HTML, … using a string processor!" you'll probably get a helpful answer that reads "hi! don't do that. Just throw a tool that actually speaks JSON, YAML, XML, HTML, or whatever you're dealing with and don't worry about all the strange things that can and will go wrong with your approach, since you're relying on properties that your data might not have tomorrow".