Reputation: 23108
The PHP code is:
$cleanedVer = preg_replace('/[^0-9,.,a-z,A-Z-]/','',$someVer);
It cleans the version sting but sometimes cleans too much info.
I'm not sure what this PCRE regular expression do to the the string in the above snippet. Anyone care to explain?
Upvotes: 0
Views: 85
Reputation: 36592
It removes any character which is not an alphanumeric, dot (.), commas (,) or hyphen (-).
Upvotes: 6