rmrp function

Remove Repeated Pattern