<?php $string = 'contr*@&oller_123////method///'; echo preg_replace('#[^\w/-]+|/(?=/+$)#', '', $string);
You have javascript disabled. You will not be able to edit any code.