fork(1) download
  1. import re, sys, unicodedata
  2.  
  3. pLu = '[{}]'.format("".join([chr(i) for i in range(sys.maxunicode) if chr(i).isupper()]))
  4. p = re.compile(r"[^\W\d_]*{Lu}[^\W\d_]*".format(Lu=pLu))
  5. sentence = 'nous avons 2 Đồng et 3 Ęułro.+++++++++++++++Next line'
  6. print(re.findall(r'[a-z]*[A-Z]+[a-z]*', sentence))
  7. print(p.findall(sentence))
Success #stdin #stdout 0.24s 9980KB
stdin
Standard input is empty
stdout
['Next']
['Đồng', 'Ęułro', 'Next']