{\bfseries{Contributing}}

\begin{quote}
Create a javascript regular expression for matching everything except for the given string. \end{quote}
Please consider following this project\textquotesingle{}s author, \href{https://github.com/jonschlinkert}{\texttt{ Jon Schlinkert}}, and consider starring the project to show your \+:heart\+: and support.\hypertarget{md_sfcode_node_modules_regex_not_README_autotoc_md24037}{}\doxysection{Install}\label{md_sfcode_node_modules_regex_not_README_autotoc_md24037}
Install with \href{https://www.npmjs.com/}{\texttt{ npm}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/-\/save regex-\/not }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_regex_not_README_autotoc_md24038}{}\doxysection{Usage}\label{md_sfcode_node_modules_regex_not_README_autotoc_md24038}

\begin{DoxyCode}{0}
\DoxyCodeLine{var not = require('regex-\/not'); }

\end{DoxyCode}


The main export is a function that takes a string an options object.


\begin{DoxyCode}{0}
\DoxyCodeLine{not(string[, options]); }

\end{DoxyCode}


{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{var not = require('regex-\/not');}
\DoxyCodeLine{console.log(not('foo'));}
\DoxyCodeLine{//=> /\string^(?:(?!\string^(?:foo)\$).)+\$/ }

\end{DoxyCode}


{\bfseries{Strict matching}}

By default, the returned regex is for strictly (not) matching the exact given pattern (in other words, \char`\"{}match this string if it does NOT \+\_\+exactly equal\+\_\+ \`{}foo\`{}\char`\"{})\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{var re = not('foo');}
\DoxyCodeLine{console.log(re.test('foo'));     //=> false}
\DoxyCodeLine{console.log(re.test('bar'));     //=> true}
\DoxyCodeLine{console.log(re.test('foobar'));  //=> true}
\DoxyCodeLine{console.log(re.test('barfoo'));  //=> true }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_regex_not_README_autotoc_md24039}{}\doxysubsection{.\+create}\label{md_sfcode_node_modules_regex_not_README_autotoc_md24039}
Returns a string to allow you to create your own regex\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{console.log(not.create('foo'));}
\DoxyCodeLine{//=> '(?:(?!\string^(?:foo)\$).)+' }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_regex_not_README_autotoc_md24040}{}\doxysubsection{Options}\label{md_sfcode_node_modules_regex_not_README_autotoc_md24040}
{\bfseries{options.\+contains}}

You can relax strict matching by setting {\ttfamily options.\+contains} to true (in other words, \char`\"{}match this string if it does NOT \+\_\+contain\+\_\+ \`{}foo\`{}\char`\"{})\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{var re = not('foo');}
\DoxyCodeLine{console.log(re.test('foo', \{contains: true\}));     //=> false}
\DoxyCodeLine{console.log(re.test('bar', \{contains: true\}));     //=> true}
\DoxyCodeLine{console.log(re.test('foobar', \{contains: true\}));  //=> false}
\DoxyCodeLine{console.log(re.test('barfoo', \{contains: true\}));  //=> false }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_regex_not_README_autotoc_md24041}{}\doxysection{About}\label{md_sfcode_node_modules_regex_not_README_autotoc_md24041}
$<$details$>$

Pull requests and stars are always welcome. For bugs and feature requests, \href{../../issues/new}{\texttt{ please create an issue}}.

$<$/details$>$

$<$details$>$

{\bfseries{Running Tests}} 

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\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install \&\& npm test }

\end{DoxyCode}


$<$/details$>$

$<$details$>$

{\bfseries{Building docs}} 

\+\_\+(This project\textquotesingle{}s readme.\+md is generated by \href{https://github.com/verbose/verb-generate-readme}{\texttt{ verb}}, please don\textquotesingle{}t edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)\+\_\+

To generate the readme, run the following command\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/g verbose/verb\#dev verb-\/generate-\/readme \&\& verb }

\end{DoxyCode}


$<$/details$>$\hypertarget{md_sfcode_node_modules_regex_not_README_autotoc_md24042}{}\doxysubsection{Related projects}\label{md_sfcode_node_modules_regex_not_README_autotoc_md24042}
You might also be interested in these projects\+:


\begin{DoxyItemize}
\item \href{https://www.npmjs.com/package/regex-cache}{\texttt{ regex-\/cache}}\+: Memoize the results of a call to the Reg\+Exp constructor, avoiding repetitious runtime compilation of… \href{https://github.com/jonschlinkert/regex-cache}{\texttt{ more}} $\vert$ \href{https://github.com/jonschlinkert/regex-cache}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/to-regex}{\texttt{ to-\/regex}}\+: Generate a regex from a string or array of strings. $\vert$ \href{https://github.com/jonschlinkert/to-regex}{\texttt{ homepage}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_regex_not_README_autotoc_md24043}{}\doxysubsection{Contributors}\label{md_sfcode_node_modules_regex_not_README_autotoc_md24043}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Commits}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Contributor}}    }\\\cline{1-2}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Commits}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Contributor}}    }\\\cline{1-2}
\endhead
9   &\href{https://github.com/jonschlinkert}{\texttt{ jonschlinkert}}    \\\cline{1-2}
1   &\href{https://github.com/doowb}{\texttt{ doowb}}    \\\cline{1-2}
1   &\href{https://github.com/EdwardBetts}{\texttt{ Edward\+Betts}}   \\\cline{1-2}
\end{longtabu}
\hypertarget{md_sfcode_node_modules_regex_not_README_autotoc_md24044}{}\doxysubsection{Author}\label{md_sfcode_node_modules_regex_not_README_autotoc_md24044}
{\bfseries{Jon Schlinkert}}


\begin{DoxyItemize}
\item \href{https://linkedin.com/in/jonschlinkert}{\texttt{ linkedin/in/jonschlinkert}}
\item \href{https://github.com/jonschlinkert}{\texttt{ github/jonschlinkert}}
\item \href{https://twitter.com/jonschlinkert}{\texttt{ twitter/jonschlinkert}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_regex_not_README_autotoc_md24045}{}\doxysubsection{License}\label{md_sfcode_node_modules_regex_not_README_autotoc_md24045}
Copyright © 2018, \href{https://github.com/jonschlinkert}{\texttt{ Jon Schlinkert}}. Released under the \mbox{[}MIT License\mbox{]}(LICENSE).

\DoxyHorRuler{0}


{\itshape This file was generated by \href{https://github.com/verbose/verb-generate-readme}{\texttt{ verb-\/generate-\/readme}}, v0.\+6.\+0, on February 19, 2018.} 