import re print re.sub('^', 'x', 'abc') CPython prints xabc, IronPython prints just abc. For FePy users: you can use FEPY_OPTIONS=regex to avoid this bug for the time being. -- Seo Sanghyeon