"recursive" regex match?


I tried to make a "recursive" regexp using the g_regexp_* functions,
i.e. something like:

 regex = g_regex_new ("^\\s*(?:(shift|ctrl|alt)-)*([a-z])\\s*$", G_REGEX_CASELESS|G_REGEX_OPTIMIZE, 0, NULL);

But when doing g_regex_match() together with g_match_info_fetch_all() I only get the
first occurence of the string matche by "(...)*". In PCRE / php, for example, such a
regex is matched recursivelly (i.e. the number of matched substring is dependent on the 
matched string). Can something like this be done in glib or is this feature missing?

Thank You!

Petr Tomasek

Petr Tomasek <http://www.etf.cuni.cz/~tomasek>
Jabber: butrus jabbim cz

EA 355:001  DU DU DU DU
EA 355:002  TU TU TU TU
EA 355:003  NU NU NU NU NU NU NU
EA 355:004  NA NA NA NA NA

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]