Implement match & replace for custom prefixes