MATLAB: Check if filename is valid.

filenamefunctionillegallive scriptsave

Hi, is there a native function or a simple code to check if a user-typed filename is valid for saving a file? (In that it doesn't contain illegal characters like /\":?<>|, etc.)

Best Answer

regexp it!