# youtube-dl transforms filenames when saving, for example changing - to _ at the start to presumbly not trigger switches in shell, but also in other strange ways too
patterns=[
"__+","_",
"^_*(-_)?","",
"^-","_"
]
trim_id=id
forfind,replaceinzip(patterns[::-2],patterns[1::-2]):# for each 2 items in the list