Skip to main content
2 of 2
added 89 characters in body
user
  • 387
  • 2
  • 21
  • 68

Haskell, 61 59 44 bytes

Saved 1 16 bytes thanks to @ovs!

(a:b)%(c:d)|a==c=a:b%d
(_:b)%c='*':b%c
e%_=e

Try it online!

user
  • 387
  • 2
  • 21
  • 68