Replace a specific sublist

I saw this post. Maybe it’ll be useful for you?