回复 21# afan
#include <Array.au3>
Global $Text = "asasaf 111.111.111.1aaa" & @CRLF & _
"asasaf 111.111.111.1" & @CRLF & _
"asasaf 111.111.111.11" & @CRLF & _
"asasaf 111.111.111.11aaa" & @CRLF & _
"asasaf 111.111.111.111" & @CRLF & _
"asasaf 111.111.111.111aaaa"
Global $a_IP_Add[3][2] = [["111\.111\.111\.1", "地址11111111111"], _
["111\.111\.111\.11", "地址22222222222222222222"], _
["111\.111\.111\.111", "地址33333"]]
For $i = 0 To UBound($a_IP_Add) - 1
$Text = StringRegExpReplace($Text, $a_IP_Add[$i][0] & "(\D)", $a_IP_Add[$i][0] & " [" & $a_IP_Add[$i][1] & "]\1")
Next
MsgBox(0, "替换", $Text)
|