Skip to content

Instantly share code, notes, and snippets.

@ebot
Created January 6, 2009 20:53
Show Gist options
  • Save ebot/43986 to your computer and use it in GitHub Desktop.
Save ebot/43986 to your computer and use it in GitHub Desktop.
#!/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