#include <array.au3>
$s_Str="Windows IP Configuration"&@CRLF& _
"Ethernet adapter 本地连接:"&@CRLF& _
" Connection-specific DNS Suffix . : cmorimatsu.sh.cn"&@CRLF& _
" IP Address. . . . . . . . . . . . : 199.234.26.229"&@CRLF& _
" Subnet Mask . . . . . . . . . . . : 255.255.255.0"&@CRLF& _
" Default Gateway . . . . . . . . . : 199.234.26.1"&@CRLF& _
"Ethernet adapter 无线网络连接 1:"&@CRLF& _
" Connection-specific DNS Suffix . : "&@CRLF& _
" Autoconfiguration IP Address. . . : 169.254.138.196"&@CRLF& _
" Subnet Mask . . . . . . . . . . . : 255.255.0.0"&@CRLF& _
" Default Gateway . . . . . . . . . : "
$a_Arr=StringRegExp($s_Str,"(?s)(?<=adapter )([^\:]+)",3)
if IsArray($a_Arr) then _ArrayDisplay($a_Arr)
这个试下 |