Jsonp 转 json 正则算法
let jsonp = 'success_jsonpCallback({"net": "内网"})'
const reg = /^\w+\((\{[^()]+\})\)$/
let flag = null
const match = jsonp.match(reg)
if(match){
flag = JSON.parse(match[1])
}
console.log(flag)
let jsonp = 'success_jsonpCallback({"net": "内网"})'
const reg = /^\w+\((\{[^()]+\})\)$/
let flag = null
const match = jsonp.match(reg)
if(match){
flag = JSON.parse(match[1])
}
console.log(flag)