regex-extname:捕获文件扩展名的正则表达式

时间:2024-05-29 08:46:12
【文件属性】:

文件名称:regex-extname:捕获文件扩展名的正则表达式

文件大小:8KB

文件格式:ZIP

更新时间:2024-05-29 08:46:12

JavaScript

文件扩展名 用于捕获文件扩展名的。 安装 $ npm install regex-extname 用法 var re = require ( 'regex-extname' ) ; 关于 用于捕获文件扩展名的。 var ext ; // On a POSIX platform... ext = re . exec ( '/foo/bar/index.js' ) [ 1 ] ; // returns '.js' // On a Windows platform... ext = re . exec ( 'C:\\foo\\bar\\index.js' ) [ 1 ] ; // returns '.js' re.posix 捕获文件扩展名的。 re.win32 捕获Windows文件扩展名的。 笔记 主要导出的正则表达式是平台相关的。 如果当前进程在Windows上运行,则re ===


【文件预览】:
regex-extname-master
----.jshintrc(1KB)
----.gitattributes(12B)
----.jshintignore(118B)
----lib()
--------index.js(358B)
----.npmignore(519B)
----examples()
--------index.js(355B)
----TODO.md(11B)
----.travis.yml(141B)
----LICENSE(1KB)
----test()
--------test.js(2KB)
----README.md(4KB)
----Makefile(2KB)
----.editorconfig(169B)
----.gitignore(1KB)
----package.json(1KB)

网友评论