Add files from parent branch HEAD:
[pkgsrc.git] / devel / tre / DESCR
1 TRE is a lightweight, robust, and efficient POSIX compliant regexp matching
2 library with some exciting features such as approximate (fuzzy) matching.
3
4 At the core of TRE is a new algorithm for regular expression matching with
5 submatch addressing. The algorithm uses linear worst-case time in the length
6 of the text being searched, and quadratic worst-case time in the length of
7 the used regular expression. In other words, the time complexity of the
8 algorithm is O(M2N), where M is the length of the regular expression and N
9 is the length of the text. The used space is also quadratic on the length
10 of the regex, but does not depend on the searched string. This quadratic
11 behaviour occurs only on pathological cases which are probably very rare
12 in practice.
13
14 TRE includes a version of the agrep (approximate grep) command line tool
15 for approximate regexp matching in the style of grep. Unlike other agrep
16 implementations (like the one by Sun Wu and Udi Manber from University of
17 Arizona available  here) TRE agrep allows full regexps of any length, any
18 number of errors, and non-uniform costs for insertion, deletion and
19 substitution.