Recently, I often work with similar files like this:
aaaa-some-bbb/file.txt
aaaa-another-bbb/file.txt
and can't setup some usefull rule.
Main idea is a algorithm that detect prefix and suffix and remove them, so for situation above it will return:
[a~some] file.txt
[a~anot] file.txt
or
[some~b] file.txt
[ther~b] file.txt
(depends on what letters you want see - from start or from end)
Recently, I often work with similar files like this: aaaa-some-bbb/file.txt aaaa-another-bbb/file.txt
and can't setup some usefull rule. Main idea is a algorithm that detect prefix and suffix and remove them, so for situation above it will return: [a~some] file.txt [a~anot] file.txt or [some~b] file.txt [ther~b] file.txt (depends on what letters you want see - from start or from end)