|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
I am trying to scan some text that is submitted through a form for a simple guestbook and would like to replace any URLs that are submitted in the comments area with a driect link to the site.
I just cant think of how to do this... does anyone have any examples that may help me out. Drew |
|
#2
|
|||
|
|||
|
if $comment contains the text, do this:
Code:
$comment =~ s| http://(.*?) | <a href=\"http://$1\">$1</a> |ig; this will link any url with a space on both sites of it. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > replace and http:// |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|