Replace prefix matching with aliases