Subject: | [patch] Add support for partial matching |
Date: | Wed, 13 Jul 2016 00:01:49 -0600 |
To: | bug-re-engine-PCRE [...] rt.cpan.org |
From: | Max Carey <maxwellhaydn [...] gmail.com> |
PCRE supports partial matching as documented in pcrepartial(3). The
attached patch adds support for partial matching to re::engine::PCRE so you
can do
use re::engine::PCRE qw(partial);
"foo" =~ /foo bar/; # matches
no re::engine::PCRE qw(partial);
"foo" =~ /foo bar/; # doesn't match
I think this is a pretty neat feature because it's one of the few things
PCRE can do that Perl regex can't.
Let me know if you would prefer a pull request. I tested on Perl 5.14.2 and
5.20.2 with libpcre 7.9, 8.32, and 8.39 (latest stable). I also tried
libpcre 5.0 (the first release to support partial matching), but the build
fails even without my changes.
Message body is not shown because sender requested not to inline it.