本帖最后由 easefull 于 2011-4-16 00:02 编辑
做题#include <Array.au3>
Local $sText = _
' Driver : Realtek RTL8188CE Wireless LAN 802.11n PCI-E NIC' & @CRLF & _
' Vendor : Realtek Semiconductor Corp.' & @CRLF & _
' Provider : Realtek Semiconductor Corp.' & @CRLF & _
' Date : 2010/10/15' & @CRLF & _
' Version : 1005.6.1015.2010' & @CRLF & _
' INF file : C:\windows\INF\oem14.inf' & @CRLF & _
' Files : 2 total' & @CRLF & _
' C:\windows\system32\DRIVERS\rtl8192Ce.sys' & @CRLF & _
' C:\windows\system32\drivers\vwifibus.sys' & @CRLF & _
' Type : Native Wi-Fi Driver' & @CRLF & _
' Radio types supported : 802.11n 802.11g 802.11b' & @CRLF & _
' FIPS 140-2 mode supported : No'
Local $sRegExp = '(?<=: ).+?\n'
Local $asResult = StringRegExp($sText, $sRegExp, 1)
If @error Then
MsgBox(4096, "", "返回结果非数组" &@LF& $asResult)
Else
For $i = 0 To UBound($asResult) - 1 Step 1
If StringLen($asResult[$i]) > 4094 Then
Local $IsCut = MsgBox(4096 + 48 + 4 + 256, "警告", "数组元素 $asResult[" & $i & "]长度超出显示界限(4094)" & @LF & "是否需要截取字符串?")
If $IsCut = 6 Then $asResult[$i] = StringLeft($asResult[$i], 4094)
EndIf
Next
_ArrayDisplay($asResult)
EndIf
Exit
读题错误
继续向afan学习... |