matlab - Exclude / negate word in filenames using FilterSpec in uigetfile -


i open dialog box select file , show files extension, exclude filenames based on pattern match (regex or otherwise).

for example, want show csv files, not ones have 'abc' in filename.

to show .csv files can (not want):

[filename, pathname] = uigetfile({'*.csv', 'csv files (*.csv)'}); 

with regular expressions, can exclude filenames 'abc' follows (thanks how negate specific word in regex?):

filenames = {'myfile.csv'; 'myfile-abc.csv'} regexp(filenames, '^(?!.*abc).*.csv') 

however, following not work:

[filename, pathname] = uigetfile({'^(?!.*abc).*.csv', 'csv files (*.csv)'}); 

how can negate word occuring in filename? seems can positive wildcards (*) not negation.

no seems impossible. if implementation in matlab, find java standard dialog called. either develop own dialog or check later outputs of dialog.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -