<?php $text = "TEST#%_'JanE,.-_doc30)/||\.pdf$@!3)"; $text = preg_replace(array('/[^\dA-Za-z]+(?=.*\.[^.]+$)/', '/_\./', '/(\.[\dA-Za-z]+).*$/'), array('_', '.', '$1'), $text); echo $text;
You have javascript disabled. You will not be able to edit any code.