How to apply this regular expression?

Sorry for this question, but I already spent 6 hours trying to apply one regex.
When analyzing one social network, I ran into a problem: some aliases may contain double quotes (f.ex. John "Superstar" Smith), and my application fails when jsonfy tries these lines. Here are the errors that I see from the online check:
enter image description here
So, how can I replace 2x double quotes with 1x double quotes, where is the previous word "nickname":?

I tried grouping (? = "Nickname" :) and looking for 2x double quotes (\ "\"), but no luck.

+4
source share
1 answer

You can use the following regular expression.

"{2}([^,}]+?)"{2}

Regular expression visualization

Demo version of Debuggex

+2
source

All Articles