Regex groups and split and combine function in regex

@Sakshi_Jain - duplicate of/cross posting