re::engine::TRE - TRE regular expression engine
version 0.09
use re::engine::TRE max_cost => 1; if ("A pearl is a hard object produced..." =~ /\(Perl\)/i) { say $1; # "pearl" }
Replaces Perl's regex engine in a given lexical scope with POSIX regular expressions provided by the TRE regular expression library. tre-0.8.0 is shipped with this module.
cost_ins: The default cost of an inserted character, that is, an extra character in string (default: 1).
cost_ins
cost_del: The default cost of a deleted character, that is, a character missing from string (default: 1).
cost_del
cost_subst: The default cost of a substituted character (default: 1).
cost_subst
max_cost: The maximum allowed cost of a match. If this is set to zero, an exact matching is searched for (default: 0).
max_cost
max_ins: Maximum allowed number of inserted characters (default: unspecified).
max_ins
max_del: Maximum allowed number of deleted characters (default: unspecified).
max_del
max_subst: Maximum allowed number of substituted characters (default: unspecified).
max_subst
max_err: Maximum allowed number of errors (inserts + deletes + substitutes; default: unspecified).
max_err
Set any value to -1 to represent "unspecified, but very high".
-1
Bitap algorithm
Introduction to the TRE regexp matching library.
re::engine::PCRE (recent Perl compatibility)
re::engine::RE2 (parameter passing)
String::Approx (tests for approximate matching)
Ævar Arnfjörð Bjarmason <avar@cpan.org>
This software is copyright (c) 2014 by Ævar Arnfjörð Bjarmason.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install re::engine::TRE, copy and paste the appropriate command in to your terminal.
cpanm
cpanm re::engine::TRE
CPAN shell
perl -MCPAN -e shell install re::engine::TRE
For more information on module installation, please visit the detailed CPAN module installation guide.