To filter out file which has a number supposed to match exactly (not partially).
We can try below code snippet.
% Your search criteria
filelist = dir(['*' num2str(number,'%d') '*']);
% Using regex to match exact number
filename = regexp({filelist.name}, ['[a-zA-Z]+' num2str(number,'%d') '[a-zA-Z.]+'], 'match');
% Removing empty cells
filename(~cellfun('isempty',filename))
When we are using dir(),we cannot do much solely using wild characters. So, we must use some alternate solution. Hope this will solve your problem.
Best Regards,
Anand Swaroop