Created
January 6, 2009 20:53
-
-
Save ebot/43986 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -wKU | |
src_file = File.new 'soar_7-1-1.xml', 'r' | |
cln_file = File.new 'soar-cleaned_7-1-1.xml', 'w' | |
cleaned_data = '' | |
src_file.each_line do |line| | |
cleaned_data += line.gsub(/[^\20-\x7E\s]/, ' ') | |
end | |
src_file.close | |
cln_file.puts cleaned_data | |
cln_file.close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment