Forums > Javascript

strippath in JS ?


November 23, 2012 | 3:15 pm

hi everyone !

could someone please help me to get the filename from the path ?
knowing Javascript string command/operations wont help .

var filename = this.substring(this.lastIndexOf("/") + 1, this.lastIndexOf("."));

max is returning an error about not existing function .
perhaps regular expression would help ,but im also getting errors .and additionaly i would like to get rid of extension string too .

would be great if some of you have a clue what to do in my case .

November 23, 2012 | 4:58 pm
Viewing 2 posts - 1 through 2 (of 2 total)

Forums > Javascript