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
This commit is contained in:
Sébastien Wilmet 2013-07-12 16:44:13 +02:00
parent b3968fb150
commit 4f327d6379

View File

@ -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
*