如果5#不是你要的,那么你的问题就不光是变量包含“()”的问题了,还有“基础”问题…#include <Array.au3>
Local $StrA = _
'1111----334' & @CRLF & _
'2222----556' & @CRLF & _
'3333----45(78)' & @CRLF & _
'44----84(76)' & @CRLF & _
'884----654(852)'
Local $StrB = _
'334' & @CRLF & _
'556' & @CRLF & _
'45(78)' & @CRLF & _
'84(76)' & @CRLF & _
'654(852)'
Local $aValA, $aValB = StringRegExp($strB, '\V+', 3)
If @Error Then Exit -1
For $i = 0 To UBound($aValB) - 1
$aValA = StringRegExp($strA, '(.+?)-+\Q' & $aValB[$i] & '\E', 1)
If Not @Error Then MsgBox(0, $aValB[$i], $aValA)
Next 膜拜一下 afan的 \Q \E!!! 路过,围观,学习!
谢谢各位!
页:
1
[2]