| re-engine-Oniguruma documentation | Contained in the re-engine-Oniguruma distribution. |
re::engine::Oniguruma - Use the Oniguruma regex engine with Perl
use re::engine::Oniguruma;
if ("Hello, world" =~ /(?<=Hello), (world)/) {
print "Greetings, $1!";
}
Replaces perl's regex engine in a given lexical scope with the Oniguruma engine.
See http://www.geocities.jp/kosako3/oniguruma/ for more information.
Andy Armstrong <andy@hexten.net>
Most of the code was modified from re::engine::PCRE. Thanks to Ævar Arnfjörð Bjarmason for writing it an all his other regex related work.
Copyright 2007, Andy Armstrong
Oniguruma is copyright 2002-2007, K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See onig/COPYING for details of Oniguruma's licence.
| re-engine-Oniguruma documentation | Contained in the re-engine-Oniguruma distribution. |
package re::engine::Oniguruma; require 5.009005; use strict; use warnings; use XSLoader (); # All engines should subclass the core Regexp package our @ISA = 'Regexp'; BEGIN { our $VERSION = '0.04'; XSLoader::load __PACKAGE__, $VERSION; } sub import { $^H{regcomp} = ENGINE; } sub unimport { delete $^H{regcomp} if $^H{regcomp} == ENGINE; } 1; __END__