Chris Hayes wrote:
At 15:07 17-11-03, you wrote:

Hi,

I have a code that should fetch the information from another webpage. The code find's the page, but I can't make it stop on </table> sign.

preg_match("|<tr class=\"listRow2\"><td class=\"listRow2\"><span class=\"listIndex\">1.+\<\/table\>|is", $buffer, $regs );


It probably looks for the last table tag. Is that so? Then you need to tell the script in a modifier that it should not be greedy (not my terminology, but the regexp term for this). The modifiers are the letters after the patern itself, in your example the i (do not make a difference between capital and small letters) and s ( I think: ignore line breaks). Try adding a U for making it non greedy. If that does not help check the docs on 'non greedy'.

Thanks for advice! The letter U did the "thing".
Are there more modifiers than letter i,s or U and where I can find more information on modifiers?


Thanks,
Sami

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to