fork(1) download
  1. // your code goes here
  2. const s = "あ い&う え"
  3.  
  4. let out = s.replace(/&#(\d{1,5});/g, (match) => {
  5. const num = parseInt(match.match(/&#(.+);/)[1])
  6. return String.fromCharCode(num)
  7. })
  8. .split(/\s| /).join(" ")
  9.  
  10. console.log(out)
Success #stdin #stdout 0.04s 17204KB
stdin
Standard input is empty
stdout
あ い&う え