<?php // Everything you enter here will be executed by our servers. Try it! $str = "safsad fd sm. pfle.jpg"; echo $a = strrpos($str,"."); $str2 = substr($str,0,$a); $str3 = preg_replace("/[-, :;]/","_",$str2); echo $str3;
You have javascript disabled. You will not be able to edit any code.