use python to convert MM:SS time format to .ass format
Something like this seems to do the trick:
text = """
02:42 02:47 And so that Wayne Gretzky method for sort of going into the future and
02:47 02:51 imagining what that future might look like, again, is a good idea for research.
"""
def convert_time(t):
return f"00:{t},000"
for line in text.splitlines():
try:
start, end, text = line.split(None, 2)
except ValueError: # if the line is out of spec, just print it
print(line)
continue
start = convert_time(start)
end = convert_time(end)
print(start, end, text, sep="\t")
The output is
00:02:42,000 00:02:47,000 And so that Wayne Gretzky method for sort of going into the future and
00:02:47,000 00:02:51,000 imagining what that future might look like, again, is a good idea for research.
Use regex sub for search and replace, \\1
corresponds to the part in brackets.
import re
text = """02:42 02:47 And so that Wayne Gretzky method for sort of going into the future and
02:47 02:51 imagining what that future might look like, again, is a good idea for research."""
print(re.sub('(\d\d:\d\d)', '00:\\1,000', text))
You might further specify the regex, e.g. with
print(re.sub('^(\d\d:\d\d)\t(\d\d:\d\d)', '00:\\1,000 00:\\2,000', text))
to avoid wrong substitutions. Check regex101.com to find the matching one for your data.