I need to identify disc files that have three hyphens in the name that may or may not be separated by numbers. The regex needs to be able to cater for this occurring at the end of the file name. I have come up with the following but am sure that there is a more elegant and efficient way to achieve what I want:
string sRegex = @"--[-|.]|-[\d]-[-|.]|--[\d][-|.]|-[\d]-[\d][-|.]";
examples of matching file names are:
Ice Cold Murders- Rocco Schiavone-1-5.ts
Lost Girl---Where There's a Will, There's a Fae_Pick_2019_04_09_20_00.ts
Lost Girl-1-4-Food For Thought_Pick_2019_04_15_20_00.ts
The three hyphens may only be separated by integers or nothing and the numbers represent series number and episode number.
I am writing an app that enters episode numbers starting from a given series and episode number as a series.