re::engine::POSIX - POSIX (IEEE Std 1003.1-2001) regular expressions
use re::engine::POSIX; if ("mooh!" =~ /\([mo]*\)/) { say $1; # "moo" }
Replaces perl's regexes in a given lexical scope with the system's POSIX regular expression engine.
POSIX regexes (unlike Perl's) behave as if the //s modifier were on by default, this can be turned off by specifying the REG_NEWLINE flag to regcomp via //m.
//s
//m
The other valid flags are x and i which turn on REG_EXTENDED and REG_ICASE respectively.
x
i
It is not possible to specify the REG_NOTBOL and REG_NOTEOL flags as they do not fit within the Perl syntax.
Error messages from from regerror will be propagated on invalid patterns.
Does not ship with its own regexp implementation so it'll fail on non-POSIX systems.
Ævar Arnfjörð Bjarmason <avar@cpan.org>
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.
To install re::engine::POSIX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm re::engine::POSIX
CPAN shell
perl -MCPAN -e shell install re::engine::POSIX
For more information on module installation, please visit the detailed CPAN module installation guide.