in reply to search for nth occurrence of a pattern in a line
Replacing nth occurrence of string will be helpul for you. Welcome to monks group