I have the following file names that exhibit this pattern:
000014_L_20111007T084734-20111008T023142.txt 000014_U_20111007T084734-20111008T023142.txt ...
If the timestamps are always after the second _ then you can use str.split and str.strip:
_
str.split
str.strip
>>> strs = "000014_L_20111007T084734-20111008T023142.txt" >>> strs.strip(".txt").split("_",2)[-1].split("-") ['20111007T084734', '20111008T023142']