Yes, that's what it does.
Sorry, I've been working so many hours that seems I'm doing a lot of mistakes...
Try this:
my $url = shift;
$url= $tags->{'URL'};
if($url=~ m/www\.(.*?)\.com/){
return $1;
}
}
This code will get the tag URL, filter it and give you back only examplesite
Save as a Global under any name than put in your templates <%nome of the global%>
Read more about Regex so you can be able to improve the code and even create your own for other purposes too. Regex is not that complicated as it sounds and will help you a lot.
Note: the m in regex can be excluded but preserve the space between ~ and first /
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Blondies can have brains (sometimes...)
Sorry, I've been working so many hours that seems I'm doing a lot of mistakes...
Try this:
Code:
sub { my $url = shift;
$url= $tags->{'URL'};
if($url=~ m/www\.(.*?)\.com/){
return $1;
}
}
This code will get the tag URL, filter it and give you back only examplesite
Save as a Global under any name than put in your templates <%nome of the global%>
Read more about Regex so you can be able to improve the code and even create your own for other purposes too. Regex is not that complicated as it sounds and will help you a lot.
Note: the m in regex can be excluded but preserve the space between ~ and first /
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Blondies can have brains (sometimes...)