rexp
v0.0.1
Published
make regexp from minimatch string or regexp string
Downloads
3
Readme
Rexp 0.0.1
** make regexp from minimatch string or regexp string **
Installation
$ npm install -g rexp
CLI usage
$ rexp './**/*'
/^\.\/(?:(?!(?:\/|^)\.).)*?\/(?!\.)(?=.)[^/]*?$/
$ rexp 'r/myRegexp$/i'
/myRegexp/i
Programmatically usage
require('rexp').create('./**/*', {}) === /^\.\/(?:(?!(?:\/|^)\.).)*?\/(?!\.)(?=.)[^/]*?$/
Options
var rexp = require('rexp')
var options = _.extend({}, rexp.defaults, {dot: true})
rexp.create('./**/*', options)