fork(714) download
  1. import re
  2. s = "HELLO there HOW are YOU"
  3. l = re.compile("(?<!^)\s+(?=[A-Z])(?!.\s)").split(s)
  4. print l
Success #stdin #stdout 0.08s 10864KB
stdin
Standard input is empty
stdout
['HELLO there', 'HOW are', 'YOU']