gboolean
xml_pcre_match_add9 (gchar* text, gssize off, gssize end,
const gchar* txtRE, xml_GNode* tree, const gchar* names[])
{
if (! txtRE || ! *txtRE || !strcmp (txtRE, "*"))
return TRUE;
if (! text || off == end)
return FALSE;
___ pcre* regex; const char* errmsg; int erridx; int ovector[33];
if (*txtRE == '*' || *txtRE == '+')
regex = pcre_compile (txtRE+1, 0, &errmsg, &erridx, 0);
else if (*txtRE == '?' || *txtRE == '^')
regex = pcre_compile (txtRE+1, PCRE_ANCHORED, &errmsg, &erridx, 0);
else
regex = pcre_compile (txtRE, PCRE_ANCHORED, &errmsg, &erridx, 0);
if (0< pcre_exec (regex, 0, text, end,
off, PCRE_NOTEMPTY, ovector, 33 ))
{
if (*txtRE == '*' || *txtRE == '+' || ovector[1] == end)
{
xml_tree_add9 (tree, ovector, names);
pcre_free (regex);
return TRUE;
} |
} |
pcre_free (regex);
return FALSE;
____;
} |
|