\href{https://travis-ci.org/regexps/rgba-regex}{\texttt{ }}

Regex for matching RGBA color strings.\hypertarget{md_sfcode_node_modules_rgba_regex_README_autotoc_md24931}{}\doxysection{Installation}\label{md_sfcode_node_modules_rgba_regex_README_autotoc_md24931}

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

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

\begin{DoxyCode}{0}
\DoxyCodeLine{var rgbaRegex = require('rgba-\/regex');}
\DoxyCodeLine{}
\DoxyCodeLine{rgbaRegex(\{ exact: true \}).test('rgba(12, 34, 56, .8)');  // => true}
\DoxyCodeLine{rgbaRegex(\{ exact: true \}).test('unicorns');         // -\/> false}
\DoxyCodeLine{rgbaRegex(\{ exact: true \}).test('rgba(,,,)');          // => false}
\DoxyCodeLine{}
\DoxyCodeLine{rgbaRegex().exec('rgba(12, 34, 56, .8)');}
\DoxyCodeLine{// => [}
\DoxyCodeLine{//  '12',}
\DoxyCodeLine{//  '34',}
\DoxyCodeLine{//  '56',}
\DoxyCodeLine{//  '.8'}
\DoxyCodeLine{//  index: 0,}
\DoxyCodeLine{//  input: 'rgba(12,34,56, .8)'}
\DoxyCodeLine{// ]}
\DoxyCodeLine{}
\DoxyCodeLine{'rgba(12, 34, 56, .8) cats and dogs'.match(rgbaRegex());}
\DoxyCodeLine{// = ['rgba(12, 34, 56, .8)'] }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_rgba_regex_README_autotoc_md24933}{}\doxysection{License}\label{md_sfcode_node_modules_rgba_regex_README_autotoc_md24933}
MIT\hypertarget{md_sfcode_node_modules_rgba_regex_README_autotoc_md24934}{}\doxysection{Contributing}\label{md_sfcode_node_modules_rgba_regex_README_autotoc_md24934}

\begin{DoxyEnumerate}
\item Fork it
\item Create your feature branch ({\ttfamily git checkout -\/b my-\/new-\/feature})
\item Commit your changes (`git commit -\/am \textquotesingle{}Add some feature'{\ttfamily )}
\item {\ttfamily Push to the branch (}git push origin my-\/new-\/feature\`{})
\item Create new Pull Request
\end{DoxyEnumerate}

Crafted with $<$3 by John Otander (\mbox{[}@4lpine\mbox{]}(\href{https://twitter.com/4lpine}{\texttt{ https\+://twitter.\+com/4lpine}})).

\DoxyHorRuler{0}


\begin{quote}
This package was initially generated with \href{http://yeoman.io}{\texttt{ yeoman}} and the \href{https://github.com/johnotander/generator-p.git}{\texttt{ p generator}}. \end{quote}
