I have the following contents in the file:
This is line one
This is line two with string1 and string3
This is line three with string3
I need to replace 'string1' with 'string2' if the line contains 'string3', so that the result would be:
This is line one
This is line two with string2 and string3
This is line three with string3