Regex value mapping

Follow these step to solve this problem.