<filename>doc/users-guide/local-commands/cmd_grep.tex
% =========================================
% COMMAND: _GREP
% =========================================

\newpage
\section{\_GREP}
\label{cmd:_GREP}

\paragraph{Syntax:}
\subparagraph{}
\texttt{\_GREP (.|headers|body|error|exec|var()) "|'<regex>"|' <variable>}

\paragraph{Purpose:}
\subparagraph{}
Defines a regular expression for a match which has two purposes:

\begin{enumerate}
\item If it matches, the matching data is stored in the $<$variable$>$.
\item If there is no match, the test does not fail (just the other way
      around than \texttt{\_MATCH}) and the variable remains unchanged.
\end{enumerate}
