implement use case TranslateRegex.