【发布时间】:2012-07-08 23:04:38
【问题描述】:
我几乎可以替换单词中的所有特殊字符,除了以下字符:
">" - greater than symbol
"<" - less than symbol
"=" - equal to symbol
我可以通过转义其他特殊字符(如 (+[]/) 等元字符)来工作。
但是,我无法使上述 3 个特殊字符起作用。
$word =~ s/[\>\<\=]//g; # Delete these special characters from the word
如何替换它们?就我而言,我试图从单词中删除或去除特殊字符,而这 3 个符号似乎是唯一我无法替代的符号。
【问题讨论】:
-
我不能reproduce你的问题。
标签: perl