Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php regex remove file extension

$withoutExt = preg_replace('/.[^.s]{3,4}$/', '', $filename);

This matches a dot followed by three or four characters which are not a dot or a space. 
  
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #regex #remove #file #extension
ADD COMMENT
Topic
Name
4+4 =