Please i would love to replace the second last occurrence of a char in a, the length of the strings can vary but the delimiter is always same I will give some examples below and what I have tried Input 1: james.sam.uri.stackoverflow.com
Output 1: james.sam.uri@stackoverflow.com
Input 2: noman.stackoverflow.com
Output 2: noman@stackoverflow.com
Input 3: queen.elizabeth.empire.co.uk
Output 3: queen.elizabeth@empire.co.uk