Im trying to pass the following regex to javascript but I couldn't achieve passing it. I was the entire afternoon trying to successfully use it for my project, but sadly I couldn't find the way to make this work. Here's the link of the regex: https://regex101.com/r/lF0fI1/272
Regex:
((?<![\\])['"])((?:.(?!(?<![\\])\1))*.?)\1
Test string: [1, "c", "[\"asd\" , 2]"]
What I want to achive is to get outer quotes of a given string.
The regex was taken from here: https://www.metaltoad.com/blog/regex-quoted-string-escapable-quotes