This routine applies the following REGEX (Regular Expression) to the indicated file.
$file =~ s/<.*?>//g;
The effect is to substitute all < and > tags, plus everything between (.*?), with nothing (//), throughout the file (globally).
Notes: (File is usually HTML but not necessarily; tag-stripping would be useful e.g. when building a corpus of web pages.)
|