2010-09-04 21:33:53 +02:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
< title > Snort AI preprocessor module: Regex management< / title >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< link href = "search/search.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javaScript" src = "search/search.js" > < / script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body onload = 'searchBox.OnSelectItem(0);' >
<!-- Generated by Doxygen 1.7.1 -->
< script type = "text/javascript" > < ! - -
var searchBox = new SearchBox("searchBox", "search",false,'Search');
-->< / script >
< div class = "navigation" id = "top" >
< div class = "tabs" >
< ul class = "tablist" >
< li > < a href = "index.html" > < span > Main Page< / span > < / a > < / li >
< li > < a href = "modules.html" > < span > Modules< / span > < / a > < / li >
< li > < a href = "annotated.html" > < span > Data Structures< / span > < / a > < / li >
< li > < a href = "files.html" > < span > Files< / span > < / a > < / li >
< li id = "searchli" >
< div id = "MSearchBox" class = "MSearchBoxInactive" >
< span class = "left" >
< img id = "MSearchSelect" src = "search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
< input type = "text" id = "MSearchField" value = "Search" accesskey = "S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
< / span > < span class = "right" >
< a id = "MSearchClose" href = "javascript:searchBox.CloseResultsWindow()" > < img id = "MSearchCloseImg" border = "0" src = "search/close.png" alt = "" / > < / a >
< / span >
< / div >
< / li >
< / ul >
< / div >
< / div >
< div class = "header" >
< div class = "summary" >
< a href = "#func-members" > Functions< / a > < / div >
< div class = "headertitle" >
< h1 > Regex management< / h1 > < / div >
< / div >
< div class = "contents" >
< table class = "memberdecls" >
< tr > < td colspan = "2" > < h2 > < a name = "func-members" > < / a >
Functions< / h2 > < / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > int < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "group__regex.html#ga35f57c052a7de1ded54b67a1f7819791" > preg_match< / a > (const char *expr, char *str, char ***matches, int *nmatches)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Check if a string matches a regular expression. < a href = "#ga35f57c052a7de1ded54b67a1f7819791" > < / a > < br / > < / td > < / tr >
2010-09-11 12:45:30 +02:00
< tr > < td class = "memItemLeft" align = "right" valign = "top" > char * < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "group__regex.html#ga736ba1abdc4938cbb1bf5861e7dbfd50" > str_replace< / a > (char *str, char *orig, char *rep)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Replace the content of 'orig' in 'str' with 'rep'. < a href = "#ga736ba1abdc4938cbb1bf5861e7dbfd50" > < / a > < br / > < / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > char * < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "group__regex.html#gaff6c55cd04fc08dd582e244590dc25a4" > str_replace_all< / a > (char *str, char *orig, char *rep)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Replace all of the occurrences of 'orig' in 'str' with 'rep'. < a href = "#gaff6c55cd04fc08dd582e244590dc25a4" > < / a > < br / > < / td > < / tr >
2010-09-04 21:33:53 +02:00
< / table >
< hr / > < h2 > Function Documentation< / h2 >
< a class = "anchor" id = "ga35f57c052a7de1ded54b67a1f7819791" > < / a > <!-- doxytag: member="regex.c::preg_match" ref="ga35f57c052a7de1ded54b67a1f7819791" args="(const char *expr, char *str, char ***matches, int *nmatches)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > int preg_match < / td >
< td > (< / td >
< td class = "paramtype" > const char * < / td >
< td class = "paramname" > < em > expr< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > char * < / td >
< td class = "paramname" > < em > str< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > char *** < / td >
< td class = "paramname" > < em > matches< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int * < / td >
< td class = "paramname" > < em > nmatches< / em > < / td > < td > < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > Check if a string matches a regular expression. < / p >
< dl > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > expr< / em > < / td > < td > Regular expression to be matched < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > str< / em > < / td > < td > String to be checked < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > matches< / em > < / td > < td > Reference to a char** that will contain the submatches (NULL if you don't need it) < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > nmatches< / em > < / td > < td > Reference to a int containing the number of submatches found (NULL if you don't need it) < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "return" > < dt > < b > Returns:< / b > < / dt > < dd > -1 if the regex is wrong, 0 if no match was found, 1 otherwise < / dd > < / dl >
2010-09-11 12:45:30 +02:00
< / div >
< / div >
< a class = "anchor" id = "ga736ba1abdc4938cbb1bf5861e7dbfd50" > < / a > <!-- doxytag: member="regex.c::str_replace" ref="ga736ba1abdc4938cbb1bf5861e7dbfd50" args="(char *str, char *orig, char *rep)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > char* str_replace < / td >
< td > (< / td >
< td class = "paramtype" > char * < / td >
< td class = "paramname" > < em > str< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > char * < / td >
< td class = "paramname" > < em > orig< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > char * < / td >
< td class = "paramname" > < em > rep< / em > < / td > < td > < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > Replace the content of 'orig' in 'str' with 'rep'. < / p >
< dl > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > str< / em > < / td > < td > String to work on < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > orig< / em > < / td > < td > String to be replaced < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > rep< / em > < / td > < td > Replacement for 'orig' < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "return" > < dt > < b > Returns:< / b > < / dt > < dd > The string with the replacement < / dd > < / dl >
< / div >
< / div >
< a class = "anchor" id = "gaff6c55cd04fc08dd582e244590dc25a4" > < / a > <!-- doxytag: member="regex.c::str_replace_all" ref="gaff6c55cd04fc08dd582e244590dc25a4" args="(char *str, char *orig, char *rep)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > char* str_replace_all < / td >
< td > (< / td >
< td class = "paramtype" > char * < / td >
< td class = "paramname" > < em > str< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > char * < / td >
< td class = "paramname" > < em > orig< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > char * < / td >
< td class = "paramname" > < em > rep< / em > < / td > < td > < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > Replace all of the occurrences of 'orig' in 'str' with 'rep'. < / p >
< dl > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > str< / em > < / td > < td > String to work on < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > orig< / em > < / td > < td > String to be replaced < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > rep< / em > < / td > < td > Replacement for 'orig' < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "return" > < dt > < b > Returns:< / b > < / dt > < dd > The string with the replacement < / dd > < / dl >
2010-09-04 21:33:53 +02:00
< / div >
< / div >
< / div >
<!-- - window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
< a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(0)" > < span class = "SelectionMark" > < / span > All< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(1)" > < span class = "SelectionMark" > < / span > Data Structures< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(2)" > < span class = "SelectionMark" > < / span > Files< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(3)" > < span class = "SelectionMark" > < / span > Functions< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(4)" > < span class = "SelectionMark" > < / span > Variables< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(5)" > < span class = "SelectionMark" > < / span > Typedefs< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(6)" > < span class = "SelectionMark" > < / span > Enumerations< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(7)" > < span class = "SelectionMark" > < / span > Enumerator< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(8)" > < span class = "SelectionMark" > < / span > Defines< / a > < / div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< iframe src = "" frameborder = "0"
name="MSearchResults" id="MSearchResults">
< / iframe >
< / div >
2010-09-11 12:45:30 +02:00
< hr class = "footer" / > < address class = "footer" > < small > Generated on Sat Sep 11 2010 12:45:18 for Snort AI preprocessor module by
2010-09-04 21:33:53 +02:00
< a href = "http://www.doxygen.org/index.html" >
< img class = "footer" src = "doxygen.png" alt = "doxygen" / > < / a > 1.7.1 < / small > < / address >
< / body >
< / html >