fork download
  1. # -*- coding: utf-8 -*-
  2. import re
  3. text = ur"הmאפrקt boom sam"
  4. result = re.sub(ur'm\b', u'X', text, 0, re.UNICODE).encode("utf8")
  5. print(result)
Success #stdin #stdout 0s 23304KB
stdin
Standard input is empty
stdout
הmאפrקt booX saX