HTTP/1.1 200
X-Application-Context: fss-proxy
Date: Tue, 03 Apr 2018 11:38:13 GMT
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE, PATCH
Access-Control-Allow-Headers: Authorization,Content-Type,If-Modified-Since,headers,If-Modified-Since
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Connection: close
18
activeSessionsCount=1
0
我有JSON在这里。我只想在当前字符串“activeSessionsCount=1”中使用正则表达式获取从0到200甚至更多的整数。这可能吗?我完全被困在这里了。
1条答案
按热度按时间thtygnil1#
这取决于你使用的正则表达式解析语言-函数和方法会有所不同。一般来说,它可以像/.*activeSessionsCount=(\d+)/gm一样简单