#include <Array.au3>
$iCountPlus = 0
$iCountMinus = 0
$iCount = 0
$sURL = 'http://www.lardi-trans.com/reliability_zone/show_responses.php?action=firm_to&rz_firm=666'
$sSourse = InetRead($sURL, 17)
If @error Then
MsgBox(16, 'Error', 'InetRead')
Exit
EndIf
$sSourse = BinaryToString($sSourse)
$sName = StringRegExpReplace(StringRegExpReplace($sSourse, '(?s).*Title="Общая информация"><b>(.*?)</td></tr>.*', '$1'), '<.*?>', '')
$aTemp = StringRegExp($sSourse, '(?s)<tr><td>(.*?)</td>\r?\n\t</tr>', 3)
If @error Then
MsgBox(16, 'Error', 'StringRegExp')
Exit
EndIf
Dim $aResult[UBound($aTemp) + 1][2]
For $i = 1 To UBound($aTemp)
$aTempCell = StringRegExp($aTemp[$i - 1], '(?s)<table.*?>(.*?)</table>', 3)
If Not @error Then
$iCount += 1
$iCountPlus += 1
For $j = 0 To UBound($aTempCell) - 1
$aResult[$iCount][$j] = StringRegExpReplace($aTempCell[$j], '<.*?>', '')
$aResult[$iCount][$j] = StringRegExpReplace($aResult[$iCount][$j], '[\r\n\t\|]', ' ')
$aResult[$iCount][$j] = StringReplace($aResult[$iCount][$j], '–', '-')
$aResult[$iCount][$j] = StringReplace($aResult[$iCount][$j], ' ', ' ')
$aResult[$iCount][$j] = StringStripWS($aResult[$iCount][$j], 7)
$aResult[$iCount][$j] = StringRegExpReplace($aResult[$iCount][$j], '^\d+\s(.*?)$', '$1')
If $j Then $iCountMinus += 1
Next
EndIf
Next
If $iCount Then
ReDim $aResult[$iCount + 1][2]
$aResult[0][0] = $iCountPlus
$aResult[0][1] = $iCountMinus
_ArrayDisplay($aResult, $sName)
Else
MsgBox(16, 'Error', 'Error')
EndIf