喵喵时光机
Javascript正则表达式/"token-id": "([^\"]*?)"/g 取第一捕获组的数据我给你一个Javascript语言的例子,你看看吧123456789101112<script type=text/javascript> var str='{ "output": { "token-data": { "token-id": "YWRtaW5AYWMuYnJhbmNoOkFhY0AxMjM0NTY=", "expired-at": { "_value": "2017-05-02T23:36:39,597+08:00"}}}}'; var regex=/"token-id": "([^\"]*?)"/g; var arr; while((arr=regex.exec(str))!=null){ alert(arr[1]); }</script> 运行结果YWRtaW5AYWMuYnJhbmNoOkFhY0AxMjM0NTY=