Is there any good regular method to deal with "['116.418261', '39.921984']"

problem description

is there any good regular way to process "["116.418261"," 39.921984"]" into ["116.418261"," 39.921984"]

the environmental background of the problems and what methods you have tried

is there anything better than the method I tried by myself
"["116.418261cm," 39.921984"]" .replace (/ [/ g _ journal"). Replace (/] / g ~ ()). Replace (/"/ g ~ ()). Split (",)

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

process "["116.418261"," 39.921984"]" into ["116.418261"," 39.921984"]


a = "['116.418261', '39.921984']"
res = JSON.parse(a.replace(/'/g, '"'))


JSON.parse(`"['116.418261', '39.921984']"`)


string interception is not enough.
Why does it have to be regular.


my own method is also wrong. It should be
"[116.418261cm, '39.921984']. Replace (/ [/ g,'). Replace (/] / g,''). Replace (/ / g,'')


string interception


you can do this without regularization

s = `"['116.418261', '39.921984']"`
s.strip('"')
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b9b350-2f26e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b9b350-2f26e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?