Stuff
public text v1 · immutabledef find_filenameconvention(files):
winner = (0,None)
for rx in common_filename_patterns:
found = 0
for filename in files:
if rx.match(filename) != None:
found += 1
if found > winner[0]:
winner = (found, rx)
return winner