Clean up regular expressions
Install
$ npm install clean-regexp
Usage
const cleanRegexp = ; ;//=> '\\d' ;//=> '\\D' ;//=> '\\w' ;//=> '\\w' ;//=> '\\W' ;//=> '\\W' ;//=> '\\w' ;//=> '\\W' ;//=> '\\d+\\.\\w'
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