Hello,
One problem with patterns of the form a___,something,b___ (or even more
complicated variants) is that they can work, but involve a combinatorial
explosion of possiblities - so things get hopelessly too slow when you
scale the code up to work on real problems.
A more efficient approach might be to treat the contents of your myDot
as a list and process it from left to right either recursively or even
indexing the terms explicitly using [[k]].
David Bailey
http://www.dbaileyconsultancy.co.uk