Code: Select all
if [string match *.jpg* $line] {
foreach jpg [regexp -all -inline {<.*?'(http://.*?\.jpg).*?>} $line] {
puthelp "PRIVMSG #jtest :$jpg"
}
}
It returns me oddly the before and after regexped results.
[00:29:06] <@PALL> <br><br><img src='
http://hotimg2.fotki.com/b/222_88/97_98/25000.jpg ' border=0 onclick="window.open('
http://www2.lookpipe.com/get.php?filepa ... /25000.jpg ');" onload='if(this.width>
[00:29:08] <@PALL>
http://hotimg2.fotki.com/b/222_88/97_98/25000.jpg
[00:29:10] <@PALL> <br><br><img src='
http://hotimg1.fotki.com/a/222_88/97_98/3353.jpg ' border=0 onclick="window.open('
http://www2.lookpipe.com/get.php?filepa ... 8/3353.jpg ');" onload='if(this.width>
[00:29:12] <@PALL>
http://hotimg1.fotki.com/a/222_88/97_98/3353.jpg
I'm quite sure this results procs from the foreach line. If I removed the PRIVMSG line nothing comes out.
Edit:
I seem to get the idea that the -inline thing parses out info as such, so should I be making a statement where 1st line dont parse, 2nd line parse, 3rd line dont parse, 4th line parse, 5th line dont parse, 6 line parse.. etc so on? Just wanna confirm.
Also user, yes it is results parsed out from a php forum so its not entirely html... I tried regexp {='([^']+)'} but am still unable to parse out the link.php from the garbled text as I have with the .jpgs...