PCRE2 10.45

PCRE2 10.45

After more than six months of development, version 10.45 of the Perl-compatible regular expressions library has been released. PCRE2, written in C and distributed under the BSD license. This is a relatively large release that includes new features, several bug fixes, and a few changes that have minor impacts on backward compatibility.

Version 10.45 is the first release prepared by the new maintainers of the project, who thank Philip Hazel, the creator and maintainer of PCRE and PCRE2 projects.

Change log:

  • The JIT compilation project sljit is now used as a Git submodule.
  • Unicode data has been updated to version 16.
  • Case-insensitive matching for Unicode properties Ll, Lt, and Lu has been changed to align with Perl. Previously, the pattern /p{Ll}/i only considered lowercase characters (even if case-insensitive matching was specified). This change also affects case-insensitive matching for POSIX classes such as [:lower:].
  • A new function scan_substring has been added. This is a new type of assertion that matches the content of the captured block against a sub-pattern.
    For example, the expression b(w++)(*scan_substring:(1).+rh) finds a word containing the rare English letter sequence 'rh', which is not at the very beginning.
  • Support has been added for character classes compatible with UTS#18 (Unicode Regular Expressions), via the new option PCRE2_ALT_EXTENDED_CLASS. This requires using [ as a metacharacter in character classes and the operators &&, —, and ~~ which allows easy subtraction and intersection of character classes.
    For example, to match Thai or Greek letters (but not letters or other symbols in those scripts), you can use the expression [p{L}&&[p{Thai}||p{Greek}]].
  • Support for Perl-style extended character classes has been added using the syntax (?[…]). This also allows expressing subtraction and intersection of character classes but with a syntax different from UTS#18 (Unicode Regular Expressions).
    For example, to match Thai or Greek letters (but not letters or other symbols in those scripts), you can use the expression (?[p{L} & (p{Thai} + p{Greek})]).
  • Significant improvements in the character class matching mechanism. Compiled character classes are now more compact and provide faster matching for large or complex character sets, using binary search across the set.
  • A new function, pcre2_set_optimize(), has been added to the API for managing optimizations.
  • Many enhancements to the pcre2_substitute() function.
  • Other improvements and bug fixes.

Source: linux.org.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster