Gossamer Forum
Home : Products : DBMan : Discussions :

AutoURL acting up

Quote Reply
AutoURL acting up
Hello, all!

I'm pleased to be the first to post a forum question on here. :)

I have a bit of an issue with the AutoURL code:

Code:
foreach $column (@db_cols) {
$test = ''; # clears the temp variable for each field
$test = $rec{$column}; # Assigns the field info to a temp variable
$test =~ s/<LI>/ /g;
$test =~ s/<([^>]|\n)*>//g; # Strip HTML codes out of the string
$test =~ m/([\w]+:\/\/[\w-?&;#~=\.\/]+[\w])/; # Finds the HTML line
$test = $1; # Assigns the temp variable to the matched HTML line

$rec{$column} =~ s/([\w]+:\/\/[\w-?&;#~=\.\/]+[\w])/<A HREF=\"$test\" target=\"new\">$1<\/A>/g;
$rec{$column} =~ s/(mailto:[\w-?@&;#~=\.\/]+[\w])/<A HREF=\"$1\" target=\"new\">$1<\/A>/gi;
}

Multiple URLs in my fields are rare, but not unheard-of. The first HTML link is perfect, going to the proper address. However, every address after that within the same field goes to the SAME address as the first rather than its own. I have tried a miriad of variations of this code to try to get around this shortcoming, but I'm at a total loss! Any ideas?

--Lee

Subject Author Views Date
Thread AutoURL acting up leisurelee 3478 May 16, 2000, 8:42 AM
Thread Re: AutoURL acting up
JPDeni 3355 May 16, 2000, 4:47 PM
Thread Re: AutoURL acting up
leisurelee 3380 May 16, 2000, 7:46 PM
Post Re: AutoURL acting up
JPDeni 3350 May 17, 2000, 2:10 AM