I have a string that has a file path:
$workingFile = '/var/tmp/A/B/filename.log.timestamps.etc';
I want to change the directory path, using two variables to note the old path portion and the new path portion:
$dir = '/var/tmp';
$newDir = '/users/asdf';
I'd like to get the following:
'/users/asdf/A/B/filename.log.timestamps.etc'