Created
April 11, 2016 21:15
-
-
Save cloudrain21/dc08fddfc79ecec085ade616d960c8e7 to your computer and use it in GitHub Desktop.
Extract filename only from path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fileName = fPath.match(/[-_\w]+[.][\w]+$/i)[0]; | |
var fileName = fPath.split('/').pop(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment