apply method to convert typ prefix out of hostname based on regex patterns