Add a new function to update the regex pattern in FileFilter, rather than recreating a FileFilter object.