Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Strip HTML line breaks from list of URLs

by diotalevi (Canon)
on May 08, 2003 at 20:06 UTC ( #256661=note: print w/replies, xml ) Need Help??


in reply to Strip HTML line breaks from list of URLs

Two ideas: just snip them off with substr. $_ = substr $_, 0, length() - 4 for @Old_URL. Or use a a substitution: s{<br>}{} for @Old_URL.

Replies are listed 'Best First'.
Re: (2) Strip HTML line breaks from list of URLs
by Maclir (Curate) on May 09, 2003 at 19:47 UTC
    And what if the html source changes to xhtml and the <br>'s become <br />?

      Then it breaks. I didn't even pretend that the regex as given would parse HTML. It just alters a string which happens to have some HTML of a known format in it.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2016-09-27 13:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (504 votes). Check out past polls.