本帖最后由 autoee 于 2014-4-27 18:07 编辑 #include <Array.au3>
Local $sData = _
'1|ccc.txt|werrt' & @CRLF & _
'2|abb.exe|12234' & @CRLF & _
'3|wer/ad.cmd|1sdf' & @CRLF & _
'4|0er/ads.bat|1234'
Local $sData1 = _
'1|abc.txt|werrt' & @CRLF & _
'2|bbb.exe|12234' & @CRLF & _
'3|wer/ad.cmd|1sdf' & @CRLF & _
'4|1er/ads.bat|1234'
Local $sData2 = _
'1|efg.txt|werrt' & @CRLF & _
'2|cbb.exe|12234' & @CRLF & _
'3|wer/ad.cmd|1sdf' & @CRLF & _
'4|2er/ads.bat|1234'
Local $sData3 = _
'1|qqwe.txt|werrt' & @CRLF & _
'2|dbb.exe|12234' & @CRLF & _
'3|wer/ad.cmd|1sdf' & @CRLF & _
'4|3er/ads.bat|1234'
Local $atmp = StringRegExp($sData, '(?m)^(\d+).([^|]+).([^|]+)\s*, 3)
Local $atmp1 = StringRegExp($sData1, '(?m)^(\d+).([^|]+).([^|]+)\s*, 3)
Local $atmp2 = StringRegExp($sData2, '(?m)^(\d+).([^|]+).([^|]+)\s*, 3)
Local $atmp3 = StringRegExp($sData3, '(?m)^(\d+).([^|]+).([^|]+)\s*, 3)
If @Error Then Exit
Local $aData[UBound($atmp) / 3][3], $x
For $i = 0 To UBound($atmp) - 1 Step 3
$aData[$x][0] = $atmp[$i]
$aData[$x][1] = $atmp[$i + 1]
$aData[$x][2] = $atmp[$i + 2]
$x += 1
Next
_ArrayDisplay($aData, UBound($aData))
已经解决
|