467,179 Members | 1,167 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,179 developers. It's quick & easy.

get the text out of an HTML code

Dear All,

There is an HTML code and I want to collect all the text from it for example: <code> text </code>.
I thought this was simple: ... $line =~ /\>([^<>]+)\</g ... but this code just does not work.
Please help me. Thank you.

Gábor Szepes
Aug 16 '08 #1
  • viewed: 1063
4 Replies
Expert 512MB
HTML::Parser or HTML-TokeParser-Simple would much easier and will not be a maintenance headache. Which is what I suggested in this thread.

Aug 16 '08 #2

Thank you for your suggestion I started to get to know the HTML Parser but I have a question on it. This Parser have subroutines like: text, comment, start and end. And all of these subroutines have variables. My question would be: how can I print out the values of these variables? (I tried the simple e.g. "print $self" command but it returns: "HASH(0x8152b44)".)
Please help me. Thank you.

Aug 23 '08 #3

Sorry for disturbing the forum. Everything is clear.

Aug 23 '08 #4
Expert 512MB
You are not bothering us. This is what we are here for. I hope you got everything sorted out correctly.

Aug 23 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by David Virgil Hobbs | last post: by
1 post views Thread by Xah Lee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.