I want to do a string replace against the following lines. I DONT want to replace any occurrence that isn’t displayed within a URL format so secure.XYZ.ab.mydomain.com on a line by itself or in variable format ($myvar = secure.XYZ.ab.mydomain.com) SHOULDN’T be replaced.
https://secure.XYZ.ab.mydomain.com -> https://secure.future.qa.mydomain.com
The problem I’m having is, XYZ and ab could be a combination of 3 different variables. So to make it easier, I want to replace everything between https:// and the period before .mydomain.com.
Forgot to add, I’ll be looping through files in a directory.
You could:
If it’s in a file, you could: