Extracting the link text

F

Fritz Bayer

Hi,

I would like to extract all the links from a html page, which I store
in a string variable.

For each link, I would also like to print out the link text, however,
omitting ALL possible tags in which the text could be embedded.

I'm looking for a regular expression, which does just that. Can
somebody help me out?

Fritz
 
C

chris-usenet

Fritz Bayer said:
I would like to extract all the links from a html page [...]
I'm looking for a regular expression, which does just that. Can
somebody help me out?

perldoc -q "remove html"

Chris
 
C

Chris Mattern

Fritz said:
Hi,

I would like to extract all the links from a html page, which I store
in a string variable.

For each link, I would also like to print out the link text, however,
omitting ALL possible tags in which the text could be embedded.

Use one of the modules for parsing HTML.
I'm looking for a regular expression, which does just that.

No, you aren't, because there ain't no such thing.
Can
somebody help me out?

Fritz

--
Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"
 
G

Gunnar Hjalmarsson

Fritz Bayer said:
I would like to extract all the links from a html page [...]
I'm looking for a regular expression, which does just that. Can
somebody help me out?

perldoc -q "remove html"

Better yet:

perldoc -q "extract URLs"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top