I'm pretty sure that when I type in , it will not only show up in my message on this Forum, but it will do so as a link.
Right now one of the scripts I use has a variable which is taken from a database with text and sometimes links ( $text_var ). I want $text_var to be read and have links converted into.. links.
I'd like to aviod using the split command if there's a way, but if you have an idea using the split command I'd still like to hear it.
I've tried this:
$text_var =~ s/ http:\/\/(.*) / <a href=\"http:\/\/$1\">http:\/\/$1</a> /g;
The problem is, the (.*) command reads all information between http:// and the last space ( ) of $text_var. I end up getting something like this when $text_var is printed:
This is a good site here: <a href=" it is just the best site ever. visit it sometime"> it is just the best site ever. visit it sometime</a>
Obviously, I want it just to read between http:// and the next space of $text_var
Thanks.
Right now one of the scripts I use has a variable which is taken from a database with text and sometimes links ( $text_var ). I want $text_var to be read and have links converted into.. links.
I'd like to aviod using the split command if there's a way, but if you have an idea using the split command I'd still like to hear it.
I've tried this:
$text_var =~ s/ http:\/\/(.*) / <a href=\"http:\/\/$1\">http:\/\/$1</a> /g;
The problem is, the (.*) command reads all information between http:// and the last space ( ) of $text_var. I end up getting something like this when $text_var is printed:
This is a good site here: <a href=" it is just the best site ever. visit it sometime"> it is just the best site ever. visit it sometime</a>
Obviously, I want it just to read between http:// and the next space of $text_var
Thanks.