Gossamer Forum
Home : Products : Gossamer Links : Discussions :

remove / form string

Quote Reply
remove / form string
How I can remove form a string the "/" that is in the end of it
Example
Form "test/" to "test"
Quote Reply
Re: [nir] remove / form string In reply to
remove_end_slash
Code:
sub {
my $tmp = $_[0];
$tmp =~ s/\/$//;
return $tmp;
}

<%remove_end_slash($variable)%>

Replace $variable with the name of the tag you want to do this with :)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] remove / form string In reply to
I have a small issue:)
If the URL is like this "site.com/test/123" and in the HTML code I insert <a href="."> it will point to "site.com/test/" is there a way that is point to "site.com/test" by using other code in the a href
Quote Reply
Re: [nir] remove / form string In reply to
Not sure what you mean? Please show me a proper example, and the HTML code you are using in the template :)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates