This question is similar to this one, however, I would like to do this without having to create any extra separated function, is it possible?
What do I have:
- Load_XXXX.5gpl_TempCycle
- RO_Mass_Load_XXXX.AAAA-31974-B
- RO_Mass_Load_XXXX.AAAA-31980
- RO_Mass_Load_Test_4a-B_TempCycle_20170427-41309
- Load_Test_4a_TempCycle
I wanna take out:
- only the ones that start with "Load_".
- or finishes with "-B"
Problem: If I use Contains(string), it will take out all of them.
What do I need: A Contain (or something else?) that takes out strings that start with "Load_" or finishes with "-B".
Result expect:
- RO_Mass_Load_XXXX.AAAA-31980
- RO_Mass_Load_Test_4a-B_UUU_20170427-41309
Code not working(it gets everything out):
if (item.Full_File_Name.Contains("-B") || item.Full_File_Name.Contains("Load"))
Any ideas or help?