Last active
July 31, 2017 07:59
-
-
Save xexi/b2844ebd68ec7a5d4120f7d53be654ca to your computer and use it in GitHub Desktop.
js extract file ext
This file contains hidden or 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 test = 'myfile.txt'; | |
console.log(test.match(/\.[0-9a-z]+$/i)[0]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment