clean-regexp ![Build Status](https://travis-ci.org/SamVerschueren/clean-regexp.svg?branch=master)
Clean up regular expressions
Install
$ npm install clean-regexp
Usage
const cleanRegexp = require('clean-regexp');
cleanRegexp('[0-9]');
cleanRegexp('[^0-9]');
cleanRegexp('[a-zA-Z0-9_]');
cleanRegexp('[a-z0-9_]', 'i');
cleanRegexp('[^a-zA-Z0-9_]');
cleanRegexp('[^a-z0-9_]', 'i');
cleanRegexp('[a-zA-Z\\d_]');
cleanRegexp('[^a-zA-Z\\d_]');
cleanRegexp('[0-9]+\\.[a-zA-Z0-9_]?');
API
cleanRegexp(regexp, [flags])
regexp
Type: string
Text of the regular expression.
flags
Type: string
Default: ''
Flags of the regular expression.
License
MIT © Sam Verschueren