clean-regexp-cli

2.0.0 • Public • Published

clean-regexp-cli

Build Status

Clean up regular expressions from the command line.

Requires Node.js 8+.

Installation

$ npm install -g clean-regexp-cli

Usage

$ crgx '[0-9]'
\d

$ crgx '/[0-9]/'
/\d/

$ crgx '[^0-9]'
\D

$ crgx '[a-zA-Z0-9_]'
\w

$ crgx '/[a-z0-9_]/i'
/\w/i

$ crgx '[^a-zA-Z0-9_]'
\W

$ crgx '/[^a-z0-9_]/i'
/\W/i

$ crgx '[a-zA-Z\d_]'
\w

$ crgx '[^a-zA-Z\d_]'
\W

$ crgx '[0-9]+\.[a-zA-Z0-9_]?' '/[0-9]+\.[a-z0-9_]?/i'
\d+\.\w?
/\d+\.\w?/i

Internals

Licence

MIT

Dependents (0)

Package Sidebar

Install

npm i clean-regexp-cli

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

4.47 kB

Total Files

6

Last publish

Collaborators

  • adalinesimonian