From: itsme213 Date: 2004-12-17T03:12:12+09:00 Subject: string to (valid) filename Don't know much about regexes or File/FileUtils, and am a bit stuck on what might be quite simple: Is there a simple way to create a valid filename (develop on XP, but would like the filenames to be valid at least on *nix as well) from a string that might contain several platform-illegal filename characters. The conversion could change spaces etc. to '_'. e.g. "Animals: Fox, Wolf, and Bear".to_filename #=> "animals_fox_wolf_and_bear" Thanks