in reply to Re^3: Replacing environment variables
in thread Replacing environment variables
Thanks for the nice concise solution, holli. Looking at it, I realise that I have missed out the case where the environment variable represents a directory and may be followed by a subdirectory (see updated OP). Thus the regexp would have to be a little different.
"It took Loris ten minutes to eat a satsuma . . . twenty minutes to get from one end of his branch to the other . . . and an hour to scratch his bottom. But Slow Loris didn't care. He had a secret . . ."