I see what you are doing, but I don't like it.  I would break this method down in to several methods, each of which checks one type of match.  That would make the code more self documenting.