NAME

re::engine::Plan9 - Plan9 regular expression engine

SYNOPSIS

use re::engine::Plan9;

if ("bewb" =~ /(.)(.)/) {
    print $1; # b
    print $2; # e
    print $'; # wb
}

DESCRIPTION

Replaces perl's regexes in a given lexical scope with Plan9 regular expression provided by libregexp9. libregexp9 and the libraries it depends on are shipped with the module.

CAVEATS

The Plan 9 engine expects the user to supply a pre-allocated buffer to regexec to hold match variables, however it provides no way to know how many match variables the pattern needs. Currently 50 match variables are allocated for every pattern match (includes $& so they go up to $49). Patches that fix the supplied libregexp9 so that it provides this information to its caller welcome.

BUGS

//g will make perl do naughty things, fix.

The build system builds the lib* stuff at perl Makefile.PL time rather than make time. Due for a fix.

SEE ALSO

http://swtch.com/plan9port/unix/

AUTHOR

Ævar Arnfjörð Bjarmason <avar@cpan.org>

LICENSE

Copyright 2007 Ævar Arnfjörð Bjarmason.

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