正则表达式规则求助
<target id="CRM" type="XRM-LEVEL" ip="127.0.0.1" port="6070" connection-num="50" username="" password="" default-uri="/" singature="false" sign-character="" domain="" transfer-mode="" /><target id="LCM" type="XCM-UP" ip="192.160.177.188" port="6030" connection-num="200" username="" password="" default-uri="/" singature="false" sign-character="" domain="" transfer-mode="tcp" />
原文如上
需要取:6030 这个值
写了一个规则如下:
(?<="LCM".*port=").*?(?=")
在Match Tracer里检查是正确的,但是使用:
$LCM_Port=StringRegExp($f,'(?<="LCM".*port=").*?(?=")',3)
却取不到数据?
有精通正则的朋友帮忙看看那错了,谢谢!! $LCM_Port=StringRegExp($f,'LCM.*(?<=port=)"(\d+)',3) id="LCM".*?port="(\d+)" 感谢两位的帮助,帮大忙了.
页:
[1]