fork download
  1. import re
  2. my_string = """this good pe-
  3. riod has"""
  4. print("to-\nday".replace("-\r\n", ""))
  5. print("to-\r\nday".replace("-\r\n", ""))
  6. print(re.sub(r"-(?:\r?\n|\r)", "", my_string))
Success #stdin #stdout 0.03s 9556KB
stdin
Standard input is empty
stdout
to-
day
today
this good period has