在下面的字符串中,如何编写关于时间的正则表达式。输出应该只是时间戳。
l1=May 30, 2012 at 8:13 AM Comment · 1Like Unlike · Bookmark Unbookmark
l2=yesterday at 12:13 AM 2Comment Like Unlike · Bookmark Unbookmark
l3=Two days ago at 01:18 AM Comment · 5Like Unlike · Bookmark Unbookmark
l4=Two days ago at 15:54 PM Comment · Like Unlike · Bookmark Unbookmark
EDIT
l5=Two days ago at 15:54:51 PM · Comment · Like Unlike · Bookmark Unbookmark
输出:
array1 = [May 30, 2012 at 8:13 AM ,yesterday at 12:13 AM ,Two days ago at 01:18 AM,Two days ago at 15:54 PM]
array2=[Comment · 1Like Unlike · Bookmark Unbookmark,2Comment · Like Unlike · Bookmark Unbookmark,Comment · 5Like Unlike · Bookmark Unbookmark,Comment · Like Unlike · Bookmark Unbookmark]
编辑:
p_date = re.compile(r'(\d{1,2}[:]\d{1,2}) but i wasnt sure how to do it if the timestamp was also like 23:12:29