re-engine-TRE reviews

RSS | Module Info | Add a review of re-engine-TRE

re-engine-TRE (0.09)

Tre ( is a regular expression library which extends standard regular expressions with approximate string matching. The re::engine::TRE module links the Tre regex engine into Perl as a substitute for the usual Perl matcher.

The module has very little written description of what it does, in particular there is nothing about how to use the approximate regexes. After much trial and error with no success, I went to the tests of this module, but still couldn't find anything which told me how Tre's syntax was implemented.

Unfortunately Tre itself is barely documented. The website's documentation consists of a grammar with not even a single example. However, it has lots of tests, so I took some example regexs from tre's "tests/retest.c" file, which look something like this:

test_comp("\\<(foobar){~}\\>", REG_EXTENDED, 0);
test_exec("zfoobarz", 0, REG_OK, 0, 8, 0, 8, END);
test_exec("boing zfoobarz goobar woop", 0, REG_OK, 15, 21, 15, 21, END);

and tried putting them into this module.

No luck!

Either the module hasn't implemented Tre's special regexes, or the author hasn't written any tests or documentation which use them. Just one line of example documentation, or even just a line in the test script, would have made a big difference to the useability of this module.