fork download
  1. import re
  2.  
  3. napis='By(author) BenBrooks,Illustratedby QuintonWinter'
  4. regularExpression = "By\(author\) ([A-Z]{1}.+?)([A-Z]{1}.+?),Illustratedby.+"
  5.  
  6. result = re.findall(regularExpression, napis)
  7.  
  8. for imieNazwisko in result:
  9. print (imieNazwisko[0] + " " + imieNazwisko[1])
  10.  
Success #stdin #stdout 0.04s 9644KB
stdin
Standard input is empty
stdout
Ben Brooks