import re class MessageParser: @staticmethod def startsWithDateAndTimeAndroid(s): pattern = r''' (?:\[?(?P\d{2}[/-]\d{2}[/-]\d{2,4}),?\s+(?P