Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Plugin to show shorter url / regex problem

Quote Reply
Plugin to show shorter url / regex problem
I have tested the regex with kommodo rx toolkit and it seems everything ok, but when i use it in Links or in the komodo edbugger, i got no values for $1, $2 and so on.

Code:


sub {
my $tags = shift;
my $tmp = "http://www.sub.domaine.com/dirs/file";#$tags->{URL};
$tmp =~ m/^(http:\/\/) ( ([a-z0-9\-]+ [\.]) +?) ([a-z0-9\-]+ [\.]) ([a-z]+) (\/) (.*)/ ;
$tmp = "$1$2$4$5$6";
if ($7 !='') {
$tmp .= "...";
}
return $tmp;
}
Has someone a clue, what´s wrong with it?
Subject Author Views Date
Thread Plugin to show shorter url / regex problem Robert 3934 Sep 11, 2003, 12:47 AM
Thread Re: [Robert] Plugin to show shorter url / regex problem
Andy 3816 Sep 11, 2003, 1:59 AM
Post Re: [Andy] Plugin to show shorter url / regex problem
Robert 3807 Sep 11, 2003, 2:02 AM