Agrep
Approximate string matching program
title: "Agrep" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["information-retrieval-systems", "unix-text-processing-utilities", "software-using-the-isc-license"] description: "Approximate string matching program" topic_path: "technology/operating-systems" source: "https://en.wikipedia.org/wiki/Agrep" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Approximate string matching program ::
::data[format=table title="Infobox software"]
| Field | Value |
|---|---|
| name | agrep |
| logo | |
| screenshot | |
| developer | {{Plainlist |
| released | |
| latest release version | 3.41.5 |
| latest release date | |
| latest preview date | |
| programming language | C |
| operating system | {{Plainlist |
| genre | Pattern matching |
| license | ISC open source license |
| website | |
| :: |
| name = agrep | logo = | logo caption = | logo_size = | logo_alt = | screenshot = | caption = | screenshot_size = | screenshot_alt = | collapsible = | developer = {{Plainlist|
- Udi Manber
- Sun Wu | released = | discontinued = | latest release version = 3.41.5 | latest release date = | latest preview version = | latest preview date = | programming language = C | operating system = {{Plainlist|
- Unix-like
- OS/2
- DOS
- Microsoft Windows | platform = | size = | language = | language footnote = | genre = Pattern matching | license = ISC open source license | standard = | website = agrep (approximate grep) is an open-source approximate string matching program, developed by Udi Manber and Sun Wu between 1988 and 1991, for use with the Unix operating system. It was later ported to OS/2, DOS, and Windows.
It selects the best-suited algorithm for the current query from a variety of the known fastest (built-in) string searching algorithms, including Manber and Wu's bitap algorithm based on Levenshtein distances.
agrep is also the search engine in the indexer program GLIMPSE. agrep is under a free ISC License.
Alternative implementations
A more recent agrep is the command-line tool provided with the TRE regular expression library. TRE agrep is more powerful than Wu-Manber agrep since it allows weights and total costs to be assigned separately to individual groups in the pattern. It can also handle Unicode. Unlike Wu-Manber agrep, TRE agrep is licensed under a 2-clause BSD-like license.
FREJ (Fuzzy Regular Expressions for Java) open-source library provides command-line interface which could be used in the way similar to agrep. Unlike agrep or TRE it could be used for constructing complex substitutions for matched text. However its syntax and matching abilities differs significantly from ones of ordinary regular expressions.
References
References
- (20–24 January 1992). "Agrep -- a fast approximate pattern-matching tool".
- [http://webglimpse.net/sublicensing/licensing.html WebGlimpse, Glimpse and also AGREP license] since 18.09.2014 ([http://opensource.org/licenses/ISC ISC License]).
- "TRE - TRE regexp matching package - Features".
- "FREJ - Fuzzy Regular Expressions for Java - Guide and Examples".
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::