fork download
  1. # your code goes here
  2.  
  3. import re
  4.  
  5. text = "Allowed Keywords: Submission of procurement Negation Keywords: pdf"
  6.  
  7. allowed_keywords = re.search(r"Allowed Keywords:\s*(.*?)\s*Negation Keywords:", text).group(1)
  8. negation_keywords = re.search(r"Negation Keywords:\s*(.*)", text).group(1)
  9.  
  10. print("Allowed Keywords:", allowed_keywords)
  11. print("Negation Keywords:", negation_keywords)
Success #stdin #stdout 0.05s 9596KB
stdin
Standard input is empty
stdout
Allowed Keywords: Submission of procurement
Negation Keywords: pdf