Created
April 6, 2019 22:23
-
-
Save dipanjanS/0a1f5324ab7d1e60a1df40c3f974ebf5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ts_pattern = r'\[(\d{2}/\w{3}/\d{4}:\d{2}:\d{2}:\d{2} -\d{4})]' | |
timestamps = [re.search(ts_pattern, item).group(1) for item in sample_logs] | |
timestamps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment