-
Notifications
You must be signed in to change notification settings - Fork 10
Cli
Matteo Basso edited this page Oct 31, 2016
·
7 revisions
As we said in the previous section natural-regex is also available as a command line tool from npm. Using this, you can easily try your regex without running your app, so, it is an interesting tool for this reason. There are also performance reasons that we have explained here.
To install the cli, you can simply run the following:
npm install -g natural-regex-cli
Now, the cli is available in your pc and from the terminal you can run:
natural-regex --parse "starts with \"Lorem\", then space and then \"foo\" or \"bar\""
^(Lorem)\s(foo|bar) // this is the string that represents the regex
Here is the table of the parameters:
// TODO