I am creating filenames based on dynamic values such as company name and forename/surname.
I would then like to verify that the filename is valid before attempting to create the file. That is check it doesn't contain any illegal characters, and replace them if they do.
I could of course just use a regular expression, but was wondering if there was an existing method in something like commons-lang or commons-io that does this?