Hi, Thursday, April 3, 2003, 11:33:02 PM, you wrote: TJ> I am having problems with preg_match_all spanning over newlines. TJ> Using /m does not seem to ignore the the newlines.
TJ> // This works TJ> // Both contents inside <td> and </td> are found TJ> $html = '<tr valign="top"> TJ> <td width="10">One cell</td> TJ> <td>Another</td> TJ> </tr>'; TJ> // This does not TJ> // Only the contents inside the first <td> and </td> are found TJ> // The only difference is that there is a linebreak efter the second <td> TJ> $html = '<tr valign="top"> TJ> <td width="10">One cell</td> TJ> <td> TJ> Another</td> TJ> </tr>'; TJ> preg_match_all("/<td.*>(.*)<\/td>/m", $html, $out); TJ> I have been doing this before, but I can't remember how I got it working... TJ> Any thougts? I think you need /s to cope with newlines -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php