By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,809 Members | 1,999 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,809 IT Pros & Developers. It's quick & easy.

get the text out of an HTML code

P: 10
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
Share this Question
Share on Google+
4 Replies


eWish
Expert 100+
P: 971
HTML::Parser or HTML-TokeParser-Simple would much easier and will not be a maintenance headache. Which is what I suggested in this thread.

--Kevin
Aug 16 '08 #2

P: 10
Hi,

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.

Gábor
Aug 23 '08 #3

P: 10
Hi,

Sorry for disturbing the forum. Everything is clear.

Gábor
Aug 23 '08 #4

eWish
Expert 100+
P: 971
You are not bothering us. This is what we are here for. I hope you got everything sorted out correctly.

--Kevin
Aug 23 '08 #5

Post your reply

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