I\'m running into an issue that I hope is simple, however I\'ve run into a wall trying to figure it out. I\'m attempting to strip the DateTime timestamp from the beginning
if you have repeat items with same pattern in your string, you can use regex find all the match then replace it to empty string
import re pattern = r'\[\w{3} \w{3} \d{2} \d{2}:\d{2}:\d{2} \d{4}\] ' for p in re.findall(pattern,line): line = line.replace(p,'')