In an effort to compare the text of two stored procedures, I generalized the problem and created code that will match subsequences of any two given sequences. I first created an iterative algorithm, then later rewrote it as a recursive CTE that blows the doors off of the original (the most recent code can be found under http://www.sqlservercentral.com/scripts/TSQL/66074/).
I'm curious if anyone could suggest an alternative to this approach, let me know if I'm missing anything, etc.? I wrote about my findings in my blog: http://jessesql.blogspot.com/2009/02/comparing-stored-procedures-part-1.html.