I am tring to get folder files names with specific pattern.
I wrote this:
string[] allfiles = Directory.GetFiles(x, "??-?-??????????.pdf", SearchOption.AllDirectories);
but this works too:
string[] allfiles = Directory.GetFiles(x, "??-?-???.pdf", SearchOption.AllDirectories);
The results are the same:
C:\Users\source\repos\LettersUploader\myFiles\10-9-110000000.pdf
C:\Users\source\repos\LettersUploader\myFiles\11-8-120000000.pdf
C:\Users\source\repos\LettersUploader\myFiles\12-7-130000000.pdf
I want that will be only numbers and in this pattern "11-1-111111111.pdf" so if there will be files that looks like this "11-1-1111.pdf" or "xx-g-atpfgtnjk.pdf" they will not inlcuded.