0

Hello,

I am trying to store in an array the content of <tr> elements in a page. A sample of the page's code looks like this:

7E7"><img src="inxclus/flags/ES.gif"></td> </tr> <tr> <td height=20 bgcolor="#FFFFFF"><b>asdsdsdf</b></i></td> <td bgcolor="#FFFFFF"><a href="./asdf.php?pid=10460">asdsdsdf</a></td> <td bgcolor="#FFFFFF">asdfasdf</td> <td align="center" bgcolor="#FFFFFF"> <img src="img/note.png"></td> <td align="center" bgcolor="#FFFFFF"><img src="inxclus/flags/ES.gif"></td> </tr> <tr> <td height=20 bgcolor="#E7E7E7"><b>asdf</b></i></td> <td bgcolor="#E7E7E7"><a href="./asdf.php?pid=10458">asdsdsdf</a></td> <td bgcolor="#E7E7E7">asdsdsdf</td> <td align="center" bgcolor="#E7E7E7"> <img src="img/note.png"></td> <td align="center" bgcolor="#E7E7E7"><img src="inxclus/flags/ES.gif"></td> </tr> <tr> <td height=20 bgcolor="#FFFFFF"><b>asdsdsdf</b></i></td> <td bgcolor="#FFF

I have played around with patterns similar to this one:

$blockPattern = '~<tr> <td height=20 bgcolor="#(E7E7E7|FFFFFF)"><b>.[^(<tr>)]+gif"></td> </tr>~';

But of course that doesn't work. Obviously i'm missing something here, any help?

Thanks

Edited by Leandro-AL: n/a

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Leandro-AL
0

Well i fixed it, used

<tr> <td height=20 bgcolor="#(E7E7E7|FFFFFF)"><b>.+?gif"></td> </tr>

Plus i just realized that parentheses don't work inside [] :P

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.