Reply to Re: preg_match and html question

Your name:

Reply:


Posted by Floortje on 06/10/07 16:01

Sam Waller wrote:
> I need a regular expression for preg_match to find all of the strings between
> '>' and '<' from html. Eg.
>
> 1. <TD><FONT SIZE='2'>XXX</FONT></TD>
> 2. <TD><FONT SIZE='2'><A HREF=http://www.whatever.com/...7>ZZZ</A></FONT></TD>
> 3. <TD ALIGN=CENTER><FONT SIZE='2'>Y/Y</FONT></TD>
>
> #1 matches should be "", "XXX", and ""
> #2 should be "", "", "ZZZ", "", ""
> #3 should be "", "Y/Y", ""
>
> Actually I need only the non-empty strings, but I can just ignore the empty ones.
>
> I've tried preg_match("/>(.*)</i", $str, $matches) but it doesn't work like I want.
> Does anyone know how to get this to work?
>
> thanks,
> Sam


strip_tags() :-)

--
Arjen
http://www.arjenkarel.nl

[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

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