Added limits to the replace code so it does not count all of the matching patterns in a string, only the number needed by the max limit.
Added limits to the replace code so it does not count all of the matching
patterns in a string, only the number needed by the max limit.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator