I have a line like this in some PHP code on my Web page:
$callthis =~ s/<[^>]*>//g;
When the page runs, I get this error:
Parse error: parse error, unexpected '<' in /Feedback.php on line 145
So I presume I must escape angle brackets somehow in the regular
expression. How do I do it? I tried putting a backslash in front of
each angle bracket, but that doesn't seem to work (same error).
The purpose of the statement is to remove HTML tags from the string.
--
Transpose hotmail and mxsmanic in my e-mail address to reach me directly.
$callthis =~ s/<[^>]*>//g;
When the page runs, I get this error:
Parse error: parse error, unexpected '<' in /Feedback.php on line 145
So I presume I must escape angle brackets somehow in the regular
expression. How do I do it? I tried putting a backslash in front of
each angle bracket, but that doesn't seem to work (same error).
The purpose of the statement is to remove HTML tags from the string.
--
Transpose hotmail and mxsmanic in my e-mail address to reach me directly.
Comment