1. An apparatus for pattern-matching characters in a stream of received characters, the apparatus comprising: a character processing unit comprising means for storing characters, and means for comparing a received input character with at least one stored character; and a controller for controlling the character processing unit, the controller including means for receiving an input stream of characters to be pattern-matched and means for controlling the character processing unit to compare characters from the input stream with characters stored by the character processing unit, wherein the character processing unit stores at least one predetermined character or character string, wherein the character processing unit comprises means for combining characters into identifiable character strings, wherein the character processing unit comprises means for providing an output that can then be used by the controller to further control the received character stream processing operation, wherein the character processing unit comprises means for outputting strings of at least one character, wherein the controller comprises means for assessing characters in the received character stream and then selectively controlling and using the character processing unit on the basis of that assessment, wherein the controller comprises means for controlling the output of the apparatus, wherein the controller comprises means for pausing the processing and input of the received character stream, wherein the controller comprises a programmable state machine for receiving the input character stream and for controlling the character processing unit to compare characters in the input character stream with characters stored by the character processing unit, wherein the programmable state machine uses state transition rules, and the state transition rules include a command field that can be used to indicate a required operation of the character processing unit, wherein there is a common set of state transitions that can be invoked from different locations within a state diagram of the programmable state machine, wherein the programmable state machine uses state transition rules to represent state transitions, and the state transition rules are of a plurality of different types, with different types of rules involving different test conditions, and wherein the programmable state machine comprises at least one state transition that causes the programmable state machine to send a command or instruction to a processing unit under the control of the programmable state machine.