fork download
  1. import re
  2.  
  3. s= ' Get exciting offers when you book a XX year car June XX - XXXX Click here to book http://a...content-available-to-author-only...c.in/XXzOK '
  4.  
  5. formatting = [
  6. [r"http://a...content-available-to-author-only...c.in/\S*", "http://a...content-available-to-author-only...c.in/XXXX"]
  7. ]
  8.  
  9. for regex, substitution in formatting:
  10. s = re.sub(regex, substitution, s)
  11. print(s)
Success #stdin #stdout 0.02s 9420KB
stdin
Standard input is empty
stdout
 Get exciting offers when you book a XX year car   June XX - XXXX Click here to book http://a...content-available-to-author-only...c.in/XXXX