Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Batch remove URLs

by marto (Cardinal)
on Oct 29, 2017 at 17:04 UTC ( [id://1202288]=note: print w/replies, xml ) Need Help??


in reply to Batch remove URLs

"Once that was fixed, I just stacked the 300 one-liners on top of each other.."

Yikes

"..and it ran perfectly"

<html> <head> <title>test</title> </head> <body> <ul> <li><a href="http://perlmonks.org">perlmonks</a></li> <li><a href="http://archive.org">archnive.org</a></li> <li><a href="http://example1.com">test</a></li> </ul> </body> </html>

Becomes:

<html> <head> <title>test</title> </head> <body> <ul> <li><a href="http://perlmonks.org">perlmonks</a></li> <li><a href="http://archive.org">archnive.org</a></li> <li><a href="[404 Not Found]">test</a></li> </ul> </body> </html>

So when 'test' is clicked it will return something along the lines of:

The requested URL /[404 Not Found] was not found on this server

Rather than replacing the link with the text(<li>[404 Not Found]></li>). You've replaced one problem for another, rather than fix it.

Replies are listed 'Best First'.
Re^2: Batch remove URLs
by bobafifi (Beadle) on Oct 29, 2017 at 20:28 UTC
     > Rather than replacing the link with the text(<li>[404 Not Found]></li>). You've replaced one problem for another, rather than fix it.

    That was just Step 1... (please see http://www.perlmonks.org/?node_id=1202118)

    Step 2: Find/Replace <a href="[404 Not Found]"> with <a> (which renders the links inactive, does it not?).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1202288]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-23 16:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found