1. A method of determining lengths of one or more substrings within an input string of characters that matches a regular expression embodied by a non-deterministic finite state automaton (NFA) stored in a search system including a forward search engine, a reverse search engine, and an inversion circuit, the method comprising: comparing the input string with the regular expression using the NFA in a forward search operation performed in the forward search engine; detecting a match state in the NFA in the forward search engine; selecting a portion of the input string as a match string in response to the match state; inverting the NFA to create a reverse NFA that embodies an inverted regular expression; reversing the match string using the inversion circuit to create a reverse match string; comparing the reverse match string with the inverted regular expression using the reverse NFA in a reverse search operation performed in the reverse search engine; and incrementing a count value in response to each character processed in the reverse search operation performed in the reverse search engine.