NAME

re::engine::PCRE2 - PCRE2 regular expression engine with jit

SYNOPSIS

use re::engine::PCRE2;

if ("Hello, world" =~ /(?<=Hello|Hi), (world)/) {
    print "Greetings, $1!";
}

DESCRIPTION

Replaces perl's regex engine in a given lexical scope with PCRE2 regular expressions provided by libpcre2-8.

This provides jit support and faster matching, but may fail in corner cases. See pcre2compat. It is typically 10% faster then the core regex engine.

Note that some packaged libpcre2-8 libraries do not enable the jit compiler. CFLAGS=-fPIC cmake -DPCRE2_SUPPORT_JIT=ON; make PCRE2 then silently falls back to the normal PCRE2 compiler and matcher.

Check with:

perl -Mre::engine::PCRE2 -e'print re::engine::PCRE2::JIT'

METHODS

Since re::engine::PCRE2 derives from the Regexp package, you can call compiled qr// objects with these methods. See PCRE2 NATIVE API MATCH CONTEXT FUNCTIONS and INFORMATION ABOUT A COMPILED PATTERN

FUNCTIONS

AUTHORS

Reini Urban rurban@cpan.org

COPYRIGHT

Copyright 2007 Ævar Arnfjörð Bjarmason. Copyright 2017 Reini Urban.

The original version was copyright 2006 Audrey Tang cpan@audreyt.org and Yves Orton.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.