Many thanks to oteacher and zlattko for highlighting and making essentially the same observation on the multiple data results. It is annoying when the post gets lost due to the session timeout. We'll look at extending it.
We are in the process right now of taking a fresh approach with the code based on these observations. The new code attempts to do away with the multiple instance table and list multiple content found in the combined table as before. The issue is when one or more of the patterns is not found for any set of matches:
Should they be left blank or filled with the previous match for that pattern?
What determines whether a whole set should be deemed ready for output? At the moment we're looking at each time the first pattern is found, we look to see if all patterns have been found already, output the results, reset the cache and continue in the file. Maybe this should be the last pattern.
Your input on these 2 issues will really help us create something usable.