Forums

This topic is locked

reamweaver command to find all urls in html code a

Posted 01 Jun 2007 22:12:56
1
has voted
01 Jun 2007 22:12:56 Robert Disher posted:

I have a weekly task of converting a standard email into a webpage. It's all simple except for each email contains around 500 url addresses. Each of these addresses needes to be turned into a link on the final webpage. What I've been doing is making each web url a link by copying the url into the "link" box and making it "_blank". Does anyone have a way to do this automatically for all urls on a page of html?

Replies

Replied 01 Jun 2007 22:30:30
01 Jun 2007 22:30:30 Alan C replied:
this sounds like a job that could be tackled with a regular expression using Perl or PHP, or a search and replace in Dreamweaver

a bit more detail would be useful - could you post an example of a few lines of what needs to be converted without compromising the identity or security of anyone, that might help others come up with better suggestions
Replied 01 Jun 2007 23:08:38
01 Jun 2007 23:08:38 Robert Disher replied:
here's what the email looks like when I first throw it into html:
----------

<p>Somali ground forces with Ethiopian air support took the last stronghold
of the Union of Islamic Courts (UIC), Kismayo, on Monday. The sudden
and dramatic shift in power has taken everyone by surprise. Clans, the
primary form of organization in the area, have reappeared, as have incidents
of clan-based violence that had largely stopped during UIC's 6-month
rule.<br>
news.bbc.co.uk/2/hi/africa/6222681.stm<br>
www.mg.co.za/articlePage.aspx?articleid=294945<br>
www.reliefweb.int/rw/RWB.NSF/db900SID/TKAE-6WX4G3?OpenDocument<br>
www.alertnet.org/thenews/newsdesk/L0231373.htm<br>
topics.nytimes.com/top/news/international/countriesandterritories/somalia/index.html?8qa</p>
<p>An ambush in southern Sudan killed two Ugandans and several Sudanese
civilians. Lord's Resistance Army rebels were suspected, but South Sudan's
government said that government-backed Janjaweed militias were responsible.
A second ambush raised the death toll to 13.<br>
www.monitor.co.ug/news/news01043.php<br>
www.irinnews.org/report.asp?ReportID=56919</p>
<p>Some Somali Islamists have arrived in Yemen.<br>
www.alertnet.org/thenews/newsdesk/L06750506.htm<br></p>

----------

I need it to end up looking like this:
----------

<p>Somali ground forces with Ethiopian air support took the last stronghold
of the Union of Islamic Courts (UIC), Kismayo, on Monday. The sudden
and dramatic shift in power has taken everyone by surprise. Clans, the
primary form of organization in the area, have reappeared, as have incidents
of clan-based violence that had largely stopped during UIC's 6-month
rule.<br>
<a href="news.bbc.co.uk/2/hi/africa/6222681.stm" target="_blank">news.bbc.co.uk/2/hi/africa/6222681.stm</a><br>
<a href="www.mg.co.za/articlePage.aspx?articleid=294945" target="_blank">www.mg.co.za/articlePage.aspx?articleid=294945</a><br>
<a href="www.reliefweb.int/rw/RWB.NSF/db900SID/TKAE-6WX4G3?OpenDocument" target="_blank">www.reliefweb.int/rw/RWB.NSF/db900SID/TKAE-6WX4G3?OpenDocument</a><br>
<a href="www.alertnet.org/thenews/newsdesk/L0231373.htm" target="_blank">www.alertnet.org/thenews/newsdesk/L0231373.htm</a><br>
<a href="topics.nytimes.com/top/news/international/countriesandterritories/somalia/index.html?8qa" target="_blank">topics.nytimes.com/top/news/international/countriesandterritories/somalia/index.html?8qa</a></p>
<p>An ambush in southern Sudan killed two Ugandans and several Sudanese
civilians. Lord's Resistance Army rebels were suspected, but South Sudan's
government said that government-backed Janjaweed militias were responsible.
A second ambush raised the death toll to 13.<br>
<a href="www.monitor.co.ug/news/news01043.php" target="_blank">www.monitor.co.ug/news/news01043.php</a><br>
<a href="www.irinnews.org/report.asp?ReportID=56919" target="_blank">www.irinnews.org/report.asp?ReportID=56919</a></p>
<p>Some Somali Islamists have arrived in Yemen.<br>
<a href="www.alertnet.org/thenews/newsdesk/L06750506.htm" target="_blank">www.alertnet.org/thenews/newsdesk/L06750506.htm</a><br></p>

----------

Reply to this topic