I have file name which look like
Directory\name-secondName-blabla.txt
If I using string .split my code need to know the separator I am using, But if in some day I will replace the separator my code will break
Is the any build in way to split to get the following result?
Directory
name
secondNmae
blabla
txt
Thanks
Edit My question is more general than just split file name, is splitting string in general