\begin{quote}
Regular expression for matching a \href{https://en.wikipedia.org/wiki/Shebang_(Unix)}{\texttt{ shebang}} \end{quote}
\hypertarget{md_sfcode_node_modules_shebang_regex_readme_autotoc_md27010}{}\doxysection{Install}\label{md_sfcode_node_modules_shebang_regex_readme_autotoc_md27010}

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

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

\begin{DoxyCode}{0}
\DoxyCodeLine{var shebangRegex = require('shebang-\/regex');}
\DoxyCodeLine{var str = '\#!/usr/bin/env node\(\backslash\)nconsole.log("{}unicorns"{});';}
\DoxyCodeLine{}
\DoxyCodeLine{shebangRegex.test(str);}
\DoxyCodeLine{//=> true}
\DoxyCodeLine{}
\DoxyCodeLine{shebangRegex.exec(str)[0];}
\DoxyCodeLine{//=> '\#!/usr/bin/env node' }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_shebang_regex_readme_autotoc_md27012}{}\doxysection{License}\label{md_sfcode_node_modules_shebang_regex_readme_autotoc_md27012}
MIT © \href{http://sindresorhus.com}{\texttt{ Sindre Sorhus}} 