NAME
re::engine::POSIX - POSIX (IEEE Std 1003.1-2001) regular expressions
SYNOPSIS
use re::engine::POSIX;
if ("I like Spoo" =~ /like \(.*\)/) {
print "Yay $1\n";
}
DESCRIPTION
Replaces perl's regexes in a given lexical scope with the system's POSIX regular expression engine.
Flags
POSIX regexes (unlike Perl's) behave as if the //s
flag were on by default, this can be turned off by specifying the REG_NEWLINE flag to regcomp via //m
.
The other valid flags are x
and i
which turn on REG_EXTENDED and REG_ICASE respectively.
It is not possible to specify the REG_NOTBOL and flags to REG_NOTEOL as this does not fit within the Perl syntax.
DIAGNOSTICS
Error messages from from regerror will be propagated on invalid patterns.
BUGS
//g
will make perl do naughty things, fix.
CAVEATS
Does not (yet?) ship with a fallback POSIX regexp implementation on systems that don't have one.
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.