Guest User

Untitled

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