-2

I have following data

"full name":"vg","address":"abc, 128, street no 9,"(0112093-0)""

Now it is clear in "key":"value" format and it is separated by comma.So I have 2 keys "full name" , "address" . I need to write a regex which will get sting between double quotes only , so something like

full name : vg
address : abc, 128, street no 9,"(0112093-0)"

I tried following but I am getting double quotes along

"(\w+)":"(.*?)"

I want to remove the fist and last double quotes from both key and value.

halfer
  • 19,824
  • 17
  • 99
  • 186
user3332404
  • 161
  • 1
  • 4
  • 13

1 Answers1

0

You can use /\"(\w+)":"(.*?)"(?=,|$)/g. Test it online

I have assumed a value can terminate with ", (might be a boundary case) or "$.

abskmj
  • 760
  • 3
  • 6