Skip to main content
3 of 3
Fixed bugs
Luke
  • 4.8k
  • 16
  • 23

Japt, 10 bytes

r"%d*$" +V

Try it online!

 r"%d*$" +V
Ur"%d*$" +V # Implicit input (U and V)
 r          # Remove
  "%d*$"    #   any trailing digits
U           #   from the first input
         +V # And append the second input
            # Implicit output
Luke
  • 4.8k
  • 16
  • 23