Reply to Can this be RegEx, or do I have to go DOM?

Your name:

Reply:


Posted by Good Man on 09/29/07 16:43

Hi there

I have a series of HTML tables (well-formed, with elements ID'd quite
nicely) and I need to extract the contents from certain TDs.

For example, I'd like to get "Hi Mom!" from the example below:
<td class="RSCWeb MainMsg">Hi Mom!</td>

My RegEx skill leave much to be desired, I don't know how to capture data
*between* two things (ie: the <td blah blah></td>)... can it be done? If
so, can someone point me to how it can be done, or give me a big tip?

If it can't be done, do I have to load the <table>s as XML and go through
the nodes searching for my content? That seems like a long-winded way to
go, and though the table is well-formed, they are quite large and deep.

There must be an easy RegEx solution if I always want to capture data
between <x attributes="y"> and </x>?

Tips, guidance appreciated!

[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

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