is there a way to extract a text from a string, by searching from a point until another one?
For example I have the following string:
string = {"sn":"Arsenal To Win","mn":"Match Result","ewc":"1/1 1","cid":9281870353,"prt":"CP","ewf":"1.0","epr":"2.12","prices":{"0":"28/25","1":"2.12","2":"+112","3":"1.12","4":"-0.893","5":"1.12"}}
and what i would like to extract is the first value 2.12, between "epr" and "prices"
I tried many options, for example:
line.startswith("epr")
but It doesn't work well, so the most simple what i tried, without write too much line of code is:
test = string[103:108]
print test
The problem is it's not dynamic, is there a dynamic way to do it?
Thanks a lot for your help!!!!