The following regular expression can be used in Perl progamming language to remove/strip HTML tags in given string.
Regular Expression:
s/<(?:[^>'”]*|([‘”]).*?\1)*>//ig
Example:
my $data ='<script>TEST</script> <img src="img.jpg">'; $data =~ s/<(?:[^>'"]*|(['"]).*?\1)*>//ig; print $data;
Output:
TEST