1. A token stitcher for determining whether an input string of characters matches a regular expression comprising a number of sub-expressions, the token stitcher comprising: an input line for receiving tokens, where each token indicates a partial match between the input string and the regular expression; a flag bank storing a number of flags, where each flag, when activated, identifies one or more of the sub-expressions that match the input string; a program memory storing a number of programs, where each program comprises instructions for processing one or more tokens; a token stitcher engine, coupled to a deterministic finite state automaton (DFA) engine and a non-deterministic finite state automaton (NFA) engine which are external to the token stitcher engine, configured to process the tokens generated from the DFA engine or the NFA engine and identify one or more programs stored in the program memory that are associated with a new token received over the input line, wherein the token stitcher engine is implemented by at least one processor-based computing device; and an output line upon which an output match signal may be asserted, wherein a particular program in the program memory is configured to assert the output match signal on the output line when a particular set of flags in the flag bank are asserted.