fork(1) download
  1. import re, sys
  2.  
  3. pLu = '[{}]'.format("".join([chr(i) for i in range(sys.maxunicode) if chr(i).isupper()]))
  4. pLl = '[{}]'.format("".join([chr(i) for i in range(sys.maxunicode) if chr(i).islower()]))
  5.  
  6. text = "She has an excelllent command on the topicsOnly problem is clarity in EnglishHer confidence is very good in RUSSian and H2O"
  7. print( re.sub(fr'({pLl})({pLu})', r'\1. \2', text) )
  8. print( re.sub(fr'([a-z])([A-Z])', r'\1. \2', text) )
  9.  
Success #stdin #stdout 0.36s 10332KB
stdin
Standard input is empty
stdout
She has an excelllent command on the topics. Only problem is clarity in English. Her confidence is very good in RUSSian and H2O
She has an excelllent command on the topics. Only problem is clarity in English. Her confidence is very good in RUSSian and H2O