Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your ❤️ and support.
Install with npm:
$ npm install --save regex-not
var not = ;
The main export is a function that takes a string an options object.
var not = ;console;//=> /^(?:(?!^(?:foo)$).)+$/
By default, the returned regex is for strictly (not) matching the exact given pattern (in other words, "match this string if it does NOT exactly equal
var re = ;console; //=> falseconsole; //=> trueconsole; //=> trueconsole; //=> true
Returns a string to allow you to create your own regex:
You can relax strict matching by setting
options.contains to true (in other words, "match this string if it does NOT contain
var re = ;console; //=> falseconsole; //=> trueconsole; //=> falseconsole; //=> false
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
You might also be interested in these projects:
- regex-cache: Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of… more | homepage
- to-regex: Generate a regex from a string or array of strings. | homepage
This file was generated by verb-generate-readme, v0.6.0, on February 19, 2018.