Skip to content
make regexp from minimatch string or regexp string
CoffeeScript JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin
README.md
package.json
rexp.coffee
rexp.js

README.md

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)
Something went wrong with that request. Please try again.