Replace regex with strcompare

This commit is contained in:
2024-07-31 21:20:43 -04:00
parent 520ef3637a
commit b5231c1ebe

View File

@@ -76,7 +76,12 @@ function varargout = EASYconsole(varargin)
if exist(d, 'dir')
subDirs=dir(d);
pattern='^\d{6}_.*_.*';
matchedDirs={dirs(regexp(subDirs.name, pattern)).name};
for i=1:length(subDirs)
if ~isempty(strmatch(subDirs(i).name, pattern))
matchedDirs{end+1}=subDirs(i).name;
end
end
whos
if ~isempty(matchedDirs)
fprintf('Found a non-empty scans directory in our list: %s\n', d);
fprintf('Setting scansDir to %s\n', char(d));