| re-engine-PCRE documentation | Contained in the re-engine-PCRE distribution. |
re::engine::PCRE - Perl-compatible regular expression engine
use re::engine::PCRE;
if ("Hello, world" =~ /(?<=Hello|Hi), (world)/) {
print "Greetings, $1!";
}
Replaces perl's regex engine in a given lexical scope with PCRE regular expressions provided by libpcre.
Ævar Arnfjörð Bjarmason <avar@cpan.org>
Copyright 2007 Ævar Arnfjörð Bjarmason.
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.
| re-engine-PCRE documentation | Contained in the re-engine-PCRE distribution. |
package re::engine::PCRE; BEGIN { $re::engine::PCRE::AUTHORITY = 'cpan:AVAR'; } BEGIN { $re::engine::PCRE::VERSION = '0.17'; } use 5.010; use XSLoader (); # All engines should subclass the core Regexp package our @ISA = 'Regexp'; BEGIN { XSLoader::load __PACKAGE__, $VERSION; } sub import { $^H{regcomp} = ENGINE; } sub unimport { delete $^H{regcomp} if $^H{regcomp} == ENGINE; } 1; __END__