pass124
11-10-2005, 12:45 AM
Hi,
I'm learning how to use preg match right now for the past two months, I've been using regular-expressions.info.
I am hoping some of you guys may know where I can learn regular expressions ALOT better, making things alot more precise, and hopefully works with PHP and PREG_MATCH.
I have html files right now, that in each of these hundreds of files, there is a table, and inside that table there is a line or several lines of information I Want to retrieve using preg match.
<?
preg_match("/<td><tr>(.*)<\/tr><\/tr>/i",$matches);
?>
This does not work the way I want it to, it keeps going from the FIRST <td><tr> found until the LAST </td></tr> found.
How do I make it go from the first <td><tr> found until the FIRST </td></tr> is come across ????
I appreciate any help, I want to LEARN this stuff better, and I learn from examples and websites, but I learned everything I could from regular-expressions.info.....
Thanks in advance.
I'm learning how to use preg match right now for the past two months, I've been using regular-expressions.info.
I am hoping some of you guys may know where I can learn regular expressions ALOT better, making things alot more precise, and hopefully works with PHP and PREG_MATCH.
I have html files right now, that in each of these hundreds of files, there is a table, and inside that table there is a line or several lines of information I Want to retrieve using preg match.
<?
preg_match("/<td><tr>(.*)<\/tr><\/tr>/i",$matches);
?>
This does not work the way I want it to, it keeps going from the FIRST <td><tr> found until the LAST </td></tr> found.
How do I make it go from the first <td><tr> found until the FIRST </td></tr> is come across ????
I appreciate any help, I want to LEARN this stuff better, and I learn from examples and websites, but I learned everything I could from regular-expressions.info.....
Thanks in advance.