rexp

make regexp from minimatch string or regexp string

npm install rexp
1 downloads in the last week
4 downloads in the last month

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

see minimatch options

var rexp = require('rexp')
var options = _.extend({}, rexp.defaults, {dot: true})
rexp.create('./**/*', options)
npm loves you