Re: "recursive" regex match?
- From: Egon Andersen <post talura dk>
- To: gtk-list gnome org
- Subject: Re: "recursive" regex match?
- Date: Sun, 31 Jul 2011 16:59:37 +0200
Petr Tomasek wrote:
Hi!
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?
Try to have a look at g_match_info_next.
Best regards
Egon Andersen
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]