Page 1 of 1

extract some text from html

Posted: Fri Jun 25, 2010 11:16 am
by Nuzhser
I get source of some files. Then i need to extract fragments of text from there. What functions do you recommend to use?

Re: extract some text from html

Posted: Fri Jun 25, 2010 12:58 pm
by Jonah Bron
You have two options. You can use regex, or you can use the XML DOM. Using one over the other depends on how predictable the target page is (and whether or not the page is valid HTML). Do you have an example to give us?