BSD Ports

Vulnerable: version 0.8.0 is affected by 1 known vulnerability. See below.

devel/tre 0.8.0 NetBSD

Lightweight and robust POSIX compliant regexp matching library

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
License
modified-bsd
Categories
devel
Package size
59.9 KiB, 261.5 KiB installed

Description

TRE is a lightweight, robust, and efficient POSIX compliant regexp matching library with some exciting features such as approximate (fuzzy) matching.

At the core of TRE is a new algorithm for regular expression matching with submatch addressing. The algorithm uses linear worst-case time in the length of the text being searched, and quadratic worst-case time in the length of the used regular expression. In other words, the time complexity of the algorithm is O(M2N), where M is the length of the regular expression and N is the length of the text. The used space is also quadratic on the length of the regex, but does not depend on the searched string. This quadratic behaviour occurs only on pathological cases which are probably very rare in practice.

TRE includes a version of the agrep (approximate grep) command line tool for approximate regexp matching in the style of grep. Unlike other agrep implementations (like the one by Sun Wu and Udi Manber from University of Arizona available here) TRE agrep allows full regexps of any length, any number of errors, and non-uniform costs for insertion, deletion and substitution.

In the other systems

SystemPortVersion
NetBSDdevel/tre0.8.0
OpenBSDtextproc/tre0.9.0

Install

Binary package:

pkgin install tre

From pkgsrc:

cd /usr/pkgsrc/devel/tre && make install clean

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

RepositoryVersion
NetBSD 10.1 x86_640.8.0
NetBSD 10.1 aarch640.8.0
SmartOS / illumos x86_640.8.0
macOS 15 arm640.8.0

Dependencies

Known vulnerabilities 1