input - logs = "2018-10-23T09:35:29Z sent message 2018-10-23T09:35:29Z transmit error 2018-10-23T09:49:29Z sent message 2018-10-23T10:01:49Z sent message 2018-10-23T10:05:29Z transmit error"
I want to use regex to split by the timestamp_format = "YYYY-MM-DDThh:mm:ssZ" so I can have a list like this, ["2018-10-23T09:35:29Z sent message", "2018-10-23T09:35:29Z transmit error",...]
Basically I want to filter all transmit errors and create a list of transmit errors. I want to do this in python.
Please help.
import re re.compile(r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z")