Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript remove extension from filename

// using string methods only
filename.substring(0, filename.lastIndexOf('.')) || filename

// using both string & array methods
filename.split('.').slice(0, -1).join('.')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #remove #extension #filename
ADD COMMENT
Topic
Name
8+9 =