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