Advertisement
Guest User

Untitled

a guest
Dec 6th, 2011
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.19 KB | None | 0 0
  1. File.new("foo.xml").each_line do |line|
  2.   re = /\\u[0-9a-fA-F]{4}/
  3.   new_str = line.gsub(re) {|match| match =  }   # I want to replace match with actual character.
  4.   puts new_str
  5. end
  6.  
  7.  
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement