Hi,
Does anyone know of a way to strip out everything from a passed in variable, excluding valid text, and <i><u><b> etc tags?
my $in = $_[0];
$in =~ s|</?.*>||sig;
}
..but that will filter out all HTML tags, which I don't want
TIA
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
Does anyone know of a way to strip out everything from a passed in variable, excluding valid text, and <i><u><b> etc tags?
Code:
sub cleanhtml { my $in = $_[0];
$in =~ s|</?.*>||sig;
}
..but that will filter out all HTML tags, which I don't want
TIA
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


Re: [Andy] Best way to strip most HTML?