{{"name":"alpha",
"age":"23",
"sex":male",
"location":"U.S"
}
{"name":"beta",
"age":"23",
"sex":male",
"location":"Cambodia"
}}
If I give a name, my regex should return the location for that name. Suppose the name is given as a variable, then I try,
"name":"alpha"[\d\D]*"location":"(.+?)"
I always get the last location with this expression. How can I get the location based on the name? Any help?