Skip to content

Instantly share code, notes, and snippets.

@tryperl
Created October 9, 2013 13:35
Show Gist options
  • Save tryperl/6901401 to your computer and use it in GitHub Desktop.
Save tryperl/6901401 to your computer and use it in GitHub Desktop.
Created by www.tryperl.com.
#Created by tryperl.com
use strict;
use warnings;
use HTML::Strip
my string = 'Salut Hugues <a href="www.hugues.com"> go</a>';
cleanLink($string);
sub cleanLink {
my $string = shift;
my $hs = HTML::Strip->new();
my $clean_text = $hs->parse( $string );
$hs->eof;
return $clean_text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment