Skip to main content
Commonmark migration
Source Link

#JavaScript (ES6), 28 26 25 bytes

JavaScript (ES6), 28 26 25 bytes

x=>y=>x.replace(/\d*$/,y)
  • 1 byte saved thanks to Neil reminding me why I shouldn't golf early in the morning!

#JavaScript (ES6), 28 26 25 bytes

x=>y=>x.replace(/\d*$/,y)
  • 1 byte saved thanks to Neil reminding me why I shouldn't golf early in the morning!

JavaScript (ES6), 28 26 25 bytes

x=>y=>x.replace(/\d*$/,y)
  • 1 byte saved thanks to Neil reminding me why I shouldn't golf early in the morning!
added 155 characters in body
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#JavaScript (ES6), 2928 2726 25 bytes

x=>y=>x.replace(/\d*?$\d*$/,y)
  • 1 byte saved thanks to Neil reminding me why I shouldn't golf early in the morning!

#JavaScript (ES6), 29 27 bytes

x=>y=>x.replace(/\d*?$/,y)

#JavaScript (ES6), 28 26 25 bytes

x=>y=>x.replace(/\d*$/,y)
  • 1 byte saved thanks to Neil reminding me why I shouldn't golf early in the morning!
Source Link
Shaggy
  • 43.5k
  • 4
  • 36
  • 94

#JavaScript (ES6), 29 27 bytes

x=>y=>x.replace(/\d*?$/,y)