Page 1 of 1

html parser

Posted: Mon May 10, 2010 9:29 am
by fredass
Hi,
what tool(library) whould you recommend for parsing HTML code. I've been using Simle HTML Dom, but this library can't search in plain text. It works for tags, elements an so on.. I need to make search by text thats between tags.. for example: <h1> word1 word2 word3 </h1> and the function should be something like that: $res = find("word2"). I know that it can be done with standart php functions but I dont have time to write my own parser.. what would you remomend?

Thanks

Re: html parser

Posted: Tue May 11, 2010 11:35 am
by katierosy
In between foreach loop you need to search the word1 to match.The existing library you have is a good one.