fork(1) download
  1. import re
  2. p = re.compile(ur'^(["«])?(.*?)(["»])\.\s*(.*?)\s*(.*)')
  3. test_str = u"The cat is running to the door, he does not look hungry anymore\".\n\nSaid my mom, whispering."
  4.  
  5. print re.search(p, test_str).groups()
Success #stdin #stdout 0.01s 7692KB
stdin
Standard input is empty
stdout
(None, u'The cat is running to the door, he does not look hungry anymore', u'"', u'', u'Said my mom, whispering.')