GithubHelp home page GithubHelp logo

demerphq / re-engine-tre Goto Github PK

View Code? Open in Web Editor NEW

This project forked from creaktive/re-engine-tre

0.0 0.0 0.0 142 KB

TRE regular expression engine

Home Page: https://metacpan.org/module/re::engine::TRE

Perl 5.20% C 94.80%

re-engine-tre's Introduction

NAME

re::engine::TRE - TRE regular expression engine

VERSION

version 0.09

SYNOPSIS

use re::engine::TRE max_cost => 1;

if ("A pearl is a hard object produced..." =~ /\(Perl\)/i) {
    say $1; # "pearl"
}

DESCRIPTION

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.

PRAGMA OPTIONS

  • cost_ins: The default cost of an inserted character, that is, an extra character in string (default: 1).

  • cost_del: The default cost of a deleted character, that is, a character missing from string (default: 1).

  • cost_subst: The default cost of a substituted character (default: 1).

  • max_cost: The maximum allowed cost of a match. If this is set to zero, an exact matching is searched for (default: 0).

  • max_ins: Maximum allowed number of inserted characters (default: unspecified).

  • max_del: Maximum allowed number of deleted characters (default: unspecified).

  • max_subst: Maximum allowed number of substituted characters (default: unspecified).

  • max_err: Maximum allowed number of errors (inserts + deletes + substitutes; default: unspecified).

Set any value to -1 to represent "unspecified, but very high".

REFERENCES

Algorithm & Implementation

Salvaged several parts from

AUTHOR

Ævar Arnfjörð Bjarmason <[email protected]>

COPYRIGHT AND LICENSE

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.

re-engine-tre's People

Contributors

creaktive avatar sergeyromanov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.