Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://256661]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2017-10-20 02:30 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (258 votes). Check out past polls.