nnxxgkf Posted April 27, 2014 Share Posted April 27, 2014 (edited) #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)) Edited April 27, 2014 by nnxxgkf Link to comment Share on other sites More sharing options...
Malkey Posted April 27, 2014 Share Posted April 27, 2014 Maybe something like this. expandcollapse popup#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, '[^|\r\n]+', 3) Local $atmp1 = StringRegExp($sData1, '[^|\r\n]+', 3) Local $atmp2 = StringRegExp($sData2, '(?m)^(\d+).([^|]+).([^|]+)\s*$', 3) Local $atmp3 = StringRegExp($sData3, '(?m)^(\d+).([^|]+).([^|]+)\s*$', 3) If @error Then Exit Local $aData4[4][9] For $i = 0 To 3 $aData4[$i][0] = $atmp[$i * 3] $aData4[$i][1] = $atmp[$i * 3 + 1] $aData4[$i][2] = $atmp[$i * 3 + 2] $aData4[$i][3] = $atmp1[$i * 3 + 1] $aData4[$i][4] = $atmp1[$i * 3 + 2] $aData4[$i][5] = $atmp2[$i * 3 + 1] $aData4[$i][6] = $atmp2[$i * 3 + 2] $aData4[$i][7] = $atmp3[$i * 3 + 1] $aData4[$i][8] = $atmp3[$i * 3 + 2] Next _ArrayDisplay($aData4) Link to comment Share on other sites More sharing options...
nnxxgkf Posted April 27, 2014 Author Share Posted April 27, 2014 ok,This is what I need, thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now