Create Regex From String Typescript Interview