Specify the count argument in re.sub(pattern, repl, string[, count, flags])
The optional argument count is the
maximum number of pattern occurrences
to be replaced; count must be a
non-negative integer. If omitted or
zero, all occurrences will be
replaced.