import re with_tab = "--- tab.py\t2009-12-27\n" with_space = "+++ space.py 2009年12月28日\n" for line in (with_tab, with_space): match = re.match("\S{3}\s" "(?P\w?\:?(?:[\/\\]?[\w\.])*)\s+" "(?P.*)", line) print("{0} - {1}".format(match.group("file"), match.group("date")))

AltStyle によって変換されたページ (->オリジナル) /