Sockread, parsing loooong lines.. help :( - 20/10/06 06:53 PM
Hi guys, I have to read and parse a long line from a website (I hate people who doesn't use \n :S).. this line is something like:
T1[item1a]T2[item1b]T3[item1c]T4[item1d]T1[item2a]T2[item2b]T3[item2c]T4...
This string is more than 950 characters long.
Well, i've this script for now:
Sadly this isn't working like I want.. this script execs the regex on the 950 char string only.. and not on the whole line.. so i'm loosing data
What can i do ? :I
[sorry for the bad english.. i hope you'll undestard what's my problem, lol]
T1[item1a]T2[item1b]T3[item1c]T4[item1d]T1[item2a]T2[item2b]T3[item2c]T4...
Quote:
<tr bgcolor="#ff0000"><td class="verdana"><a href="?link" title="blahblah">[item1a]</a></td><td class="verdana"><a href="?link2">#</a></td><td class="verdana">[item1b]</td><td class="verdana">blah</td><td class="verdana">[item1c]</td><td class="verdana">[item1d]</td></tr><tr bgcolor="#ff0000"><td class="verdana"><a href="?link" title="blahblah">[item2a]</a></td><td class="verdana"><a href="?link2">#</a></td><td class="verdana">[item2b]</td><td class="verdana">blah</td><td class="verdana">[item2c]</td><td class="verdana">[item2d]</td></tr>...
This string is more than 950 characters long.
Well, i've this script for now:
Code:
on *:sockread:sada:{ if ($sockerr) return var %t, %re = /regular expression/ sockread %t while ($sockbr) { if ($regex(%t, %re)) echo -a >> $regml(1) - $regml(2) - $regml(3) - $regml(4) sockread %t } }
Sadly this isn't working like I want.. this script execs the regex on the 950 char string only.. and not on the whole line.. so i'm loosing data
What can i do ? :I
[sorry for the bad english.. i hope you'll undestard what's my problem, lol]