I am still learning regex and I cannot find the solution to my problem. I want to match all single quotes in a string, but not if the single quote is within a double quote.
For example, I have a string:
'['hello', "that's great", "Good to see you O'shay"]'
I would like to be able to match the single quotes around 'hello', but not the single quotes nested inside the double quotes.
I hope that makes sense! Thanks in advance!
edit
Instead of matching the single quotes, would be possible to obtain the strings, i.e.
'['hello', "that's great", "Good to see you O'shay"]'
to
'[hello, that's great, Good to see you O'shay]'
Not sure if that makes the problem easier or harder? Would welcome being enlightened!