[glib] GRegex: update documentation for partial matching



commit 4f327d6379c3eb8f9dcd5127349c06f1d34b1155
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Jul 12 16:44:13 2013 +0200

    GRegex: update documentation for partial matching
    
    The restrictions on partial matching no longer apply with PCRE >= 8.00.
    
    The pcrepartial manpage contains the "FORMERLY RESTRICTED PATTERNS"
    section:
    
    "For  releases  of PCRE prior to 8.00, because of the way certain
    internal optimizations were implemented in the pcre_exec() function, the
    PCRE_PARTIAL option (predecessor of PCRE_PARTIAL_SOFT) could not be used
    with all patterns. From release 8.00 onwards, the restrictions no
    longer  apply,  and  partial  matching  with  can  be requested for any
    pattern."
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704250

 glib/gregex.c |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/glib/gregex.c b/glib/gregex.c
index 1ae8e0a..fa3a18f 100644
--- a/glib/gregex.c
+++ b/glib/gregex.c
@@ -874,19 +874,11 @@ g_match_info_get_match_count (const GMatchInfo *match_info)
  * stops at the partial match.
  * When both #G_REGEX_MATCH_PARTIAL_SOFT and #G_REGEX_MATCH_PARTIAL_HARD
  * are set, the latter takes precedence.
- * See <ulink>man:pcrepartial</ulink> for more information on partial matching.
  *
- * Because of the way certain internal optimizations are implemented
- * the partial matching algorithm cannot be used with all patterns.
- * So repeated single characters such as "a{2,4}" and repeated single
- * meta-sequences such as "\d+" are not permitted if the maximum number
- * of occurrences is greater than one. Optional items such as "\d?"
- * (where the maximum is one) are permitted. Quantifiers with any values
- * are permitted after parentheses, so the invalid examples above can be
- * coded thus "(a){2,4}" and "(\d)+". If #G_REGEX_MATCH_PARTIAL or 
- * #G_REGEX_MATCH_PARTIAL_HARD is set
- * for a pattern that does not conform to the restrictions, matching
- * functions return an error.
+ * There were formerly some restrictions on the pattern for partial matching.
+ * The restrictions no longer apply.
+ *
+ * See <ulink>man:pcrepartial</ulink> for more information on partial matching.
  *
  * Returns: %TRUE if the match was partial, %FALSE otherwise
  *


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