You are here: Re: Regular Expression Problem « PHP Programming Language « IT news, forums, messages
Re: Regular Expression Problem

Posted by BinnyVA on 09/27/05 11:55

Hi,

> I am trying to extract hello world out of the following html string if
> the "message" string is found in the same row.

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

Try...

preg_match_all('/<tr><td>message<\/td><td><i>(.+?)<\/i><\/td><\/tr>/',$string,
$matches);

Hope this is what you are looking for.

--
Binny V A
http://www.bin-co.com/ - All about Scripting Languages in Web
Development

 

Navigation:

[Reply to this 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

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