 
                                                        matt

matt is a  simple, old-fashioned, command-line driven program, but I believe 
it is fairly unique in relation to commonly available tools, such as grep and awk,
with somewhat similar functions.   Like them, it locates segments of a text by
matching with regular expressions.   Unlike them, it is not 'line-(or record-)bound': 
an expression 'locates' exactly the text that it matches, rather than the record 
that contains it.  The matched segment may be part of a line, or extend 
over several lines.

That seemingly minor difference in strategy means that matt can handle 
tasks that are difficult or impossible with the other programs.  It can pull 
entire paragraphs that match some desired criterion out of a text, locate
elements within an HTML or XML file, and so on.

To give it even more versatility, an "output template" may be specified that
controls exactly what is output when a match is found..  It can reorder segments
of the match, or insert other text determined by the content of the match.
If desired, the unmatched portions of the input can be output unchanged,
interleaved with the (transformed) matches, so alterations can be made
where desired throughout a file.

This 1.4 release (January 2006) improves the handling of unmatched text,
so that each buffer is discarded (or output if the '-v' option is used)
as soon as the absence of a match is assured.

The 1.3 release (April 2005) fixed the 8-bit byte mode properly, so that
it can even scan binary files for byte-sequences of interest (including
null bytes, which were not treated properly before).  It also added new
template elements for more versatile conditional text output.

Note that by default (unless the '-8' option is given to select full 8-bit mode)
matt is UTF-8-aware, so it handles both 7-bit standard ASCII and extended
UTF-8, both in match patterns and files, without problem.

The  1.2 (February 2005) release fixed some stupidities in character
handling: You can now specify unicode characters with hex values ("\xnnnn").
There was an extremely rare crash when an extended 8-bit ISO character was
encountered in UTF mode at a particular point.  1.1 (February 2004) fixed
an obscure bug that could in rare cases prevent a match when the
'beginning-of-line' character ('^') was used in the expression.


Installation:

As matt is run from a shell command line, it should be in the path.  Move, 
copy, or link the executable from here into /boot/home/config/bin 
to make it available from anywhere.

                                                          ** ** **
                               