Reply to Re: Regular Expression Problem

Your name:

Reply:


Posted by mich dobelman on 12/17/08 11:55

Thank you for your reply.

I wanted to carry bg-grey-m class just in case similar table happened to be
found.
However, after all, putting /s switch solved all the problem.
I haven't figured out what /s is for.

preg_match_all("/<td
[^>]*class=\"bg-grey-m\">[^<]+<table([^>]*)>.*<td[^>]*>message<\/td><td[^>]*><i>(.*)<\/i><\/td>.*<\/table>/siU",
$string, $matches);

foreach($matches[2] as $link)
{
echo "<li>$link</li>\n";
}

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация