php regex remove file extension

Solutions on MaxInterview for php regex remove file extension by the best coders in the world

showing results for - "php regex remove file extension"
Jonah
02 Mar 2016
1$withoutExt = preg_replace('/\\.[^.\\s]{3,4}$/', '', $filename);
2
3This matches a dot followed by three or four characters which are not a dot or a space. 
4  
Kamryn
13 Jan 2019
1remove file extension [.mp4 .mp3 ETC]