import re

def less10(string):
    return int(string) - 10

def replacer(match):
    return '%s%d,%d%s' % (match.group('prefix'),
                          less10(match.group('x')),
                          less10(match.group('y')),
                          match.group('suffix'))

print re.sub(r'(?P<prefix><stuff[^>]*translate\()(?P<x>\d*),(?P<y>\d*)(?P<suffix>\)/>)',
             replacer,
             '<stuff translate(100,200)/>')
