How to write regex to extract pattern from string
i have a JSON string and i want to extract the information i need to care
about B what i want is to extract the value of the key 'name' from JSON
string, there may be multiple entries of 'name' . e.g the JSON string is :
{"key1":"value1","key2":"value2","key3":"value3","name":"allen","detail":{"detailkey1":"detailvalue2","name":"john","detailkey2":"detailvalue2"}}
i need to extract 'allen' and 'john' from this JSON String.
I am not familiar with regex and hope someone can help on it.
If you can give sample code in java, that's will be great.
Thanks
No comments:
Post a Comment