TextFilter is a Java library that performs nested filtering and transformations on arbitrary textual data.
TextFilter allows arbitrary text "handlers" that are used to parse, transform, and/or block the text triggering the invocation of each handler. Handlers are grouped in "filters", and are stackable within the context of a filter parsing call. Filters may also be stacked within the call, allowing nested behavior.
TextFilter comes with a set of standard low-level handlers, such
as HTML escaping and constant tags, as well as a number of complex
nesting HTML tag handlers, such as
<ol> handlers. There are also some special-purpose
handlers that can, for example, create links to Google searches and
TextFilter originated as a Python rewrite of a Perl programming example. The resulting code, written by Scott Anderson, was used in the Zope prototype of the IWETHEY Forums. Subsequently, this code was ported by Scott to ObjectiveC and finally Java, gaining features along the way.