As for the code I provided, well good luck deciphering it. The algorithm I used is pretty complex. The key idea though is for each packet to maintain a hash whose keys are the substrings we are still interested in, and whose values are the set of positions in that packet where the pattern starts. :-)
I don't tend to write production code like that....
In reply to RE (3): Shot myself in the foot with a pos
by tilly
in thread Shot myself in the foot with a pos
by Guildenstern
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |