这个正则表达式到底是做什么的


What does this regular expression do exactly?

PHP代码为:

$cleanedVer = preg_replace('/[^0-9,.,a-z,A-Z-]/','',$someVer);

它清除版本标记,但有时清除的信息太多。

我不确定这个PCRE正则表达式对上面代码片段中的字符串做了什么。有人愿意解释一下吗?

删除除以外的任何字符:字母、数字、点(.)、逗号(,)或连字符(-)。