本帖最后由 afan 于 2022-7-22 14:13 编辑
是这样,改得好,我的漏了个/, \1//\2/\3
实际上,对于这种特征很明显的取值(最右地址),可以很简单
Local $sSource = '{"request_type":"2","virustime":"2022-07-20","filesize":"24M","virusVersion":"2022.7.20.1","version":"5.0.69.3","createtime":"2022-07-20 18:17:53","fullName":"sysdiag-full-5.0.69.3-2022.7.20.1.exe","allName":"sysdiag-all-5.0.69.3-2022.7.20.1.exe","urlFull":"https:\/\/down7.huorong.cn\/sysdiag-full-5.0.69.3-2022.7.20.1.exe","urlAll":"https:\/\/down7.huorong.cn\/sysdiag-all-5.0.69.3-2022.7.20.1.exe"}'
Local $aSRE = StringRegExp($sSource, '.+":"(.+)"', 1)
If Not @Error Then MsgBox(0, '', StringReplace($aSRE[0], '\', ''))
对于复杂的Json结构,用Json函数去取值较好,而对于这种简单的,用正则一定是首选,简单高效。
|