\hypertarget{group__regex}{ \section{Regex management} \label{group__regex}\index{Regex management@{Regex management}} } \subsection*{Functions} \begin{DoxyCompactItemize} \item int \hyperlink{group__regex_ga35f57c052a7de1ded54b67a1f7819791}{preg\_\-match} (const char $\ast$expr, char $\ast$str, char $\ast$$\ast$$\ast$matches, int $\ast$nmatches) \begin{DoxyCompactList}\small\item\em Check if a string matches a regular expression. \item\end{DoxyCompactList}\item char $\ast$ \hyperlink{group__regex_ga736ba1abdc4938cbb1bf5861e7dbfd50}{str\_\-replace} (char $\ast$str, char $\ast$orig, char $\ast$rep) \begin{DoxyCompactList}\small\item\em Replace the content of 'orig' in 'str' with 'rep'. \item\end{DoxyCompactList}\item char $\ast$ \hyperlink{group__regex_gaff6c55cd04fc08dd582e244590dc25a4}{str\_\-replace\_\-all} (char $\ast$str, char $\ast$orig, char $\ast$rep) \begin{DoxyCompactList}\small\item\em Replace all of the occurrences of 'orig' in 'str' with 'rep'. \item\end{DoxyCompactList}\end{DoxyCompactItemize} \subsection{Function Documentation} \hypertarget{group__regex_ga35f57c052a7de1ded54b67a1f7819791}{ \index{regex@{regex}!preg\_\-match@{preg\_\-match}} \index{preg\_\-match@{preg\_\-match}!regex@{regex}} \subsubsection[{preg\_\-match}]{\setlength{\rightskip}{0pt plus 5cm}int preg\_\-match ( \begin{DoxyParamCaption} \item[{const char $\ast$}]{ expr, } \item[{char $\ast$}]{ str, } \item[{char $\ast$$\ast$$\ast$}]{ matches, } \item[{int $\ast$}]{ nmatches} \end{DoxyParamCaption} )}} \label{group__regex_ga35f57c052a7de1ded54b67a1f7819791} Check if a string matches a regular expression. \begin{DoxyParams}{Parameters} \item[{\em expr}]Regular expression to be matched \item[{\em str}]String to be checked \item[{\em matches}]Reference to a char$\ast$$\ast$ that will contain the submatches (NULL if you don't need it) \item[{\em nmatches}]Reference to a int containing the number of submatches found (NULL if you don't need it) \end{DoxyParams} \begin{DoxyReturn}{Returns} -\/1 if the regex is wrong, 0 if no match was found, 1 otherwise \end{DoxyReturn} \hypertarget{group__regex_ga736ba1abdc4938cbb1bf5861e7dbfd50}{ \index{regex@{regex}!str\_\-replace@{str\_\-replace}} \index{str\_\-replace@{str\_\-replace}!regex@{regex}} \subsubsection[{str\_\-replace}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ str\_\-replace ( \begin{DoxyParamCaption} \item[{char $\ast$}]{ str, } \item[{char $\ast$}]{ orig, } \item[{char $\ast$}]{ rep} \end{DoxyParamCaption} )}} \label{group__regex_ga736ba1abdc4938cbb1bf5861e7dbfd50} Replace the content of 'orig' in 'str' with 'rep'. \begin{DoxyParams}{Parameters} \item[{\em str}]String to work on \item[{\em orig}]String to be replaced \item[{\em rep}]Replacement for 'orig' \end{DoxyParams} \begin{DoxyReturn}{Returns} The string with the replacement \end{DoxyReturn} \hypertarget{group__regex_gaff6c55cd04fc08dd582e244590dc25a4}{ \index{regex@{regex}!str\_\-replace\_\-all@{str\_\-replace\_\-all}} \index{str\_\-replace\_\-all@{str\_\-replace\_\-all}!regex@{regex}} \subsubsection[{str\_\-replace\_\-all}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ str\_\-replace\_\-all ( \begin{DoxyParamCaption} \item[{char $\ast$}]{ str, } \item[{char $\ast$}]{ orig, } \item[{char $\ast$}]{ rep} \end{DoxyParamCaption} )}} \label{group__regex_gaff6c55cd04fc08dd582e244590dc25a4} Replace all of the occurrences of 'orig' in 'str' with 'rep'. \begin{DoxyParams}{Parameters} \item[{\em str}]String to work on \item[{\em orig}]String to be replaced \item[{\em rep}]Replacement for 'orig' \end{DoxyParams} \begin{DoxyReturn}{Returns} The string with the replacement \end{DoxyReturn}