Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- File.new("foo.xml").each_line do |line|
- re = /\\u[0-9a-fA-F]{4}/
- result = ''
- line.gsub(re) {|match| eval 'result += "' + match.to_s + '"' } # I want to replace match with actual character.
- puts result
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement