Using .replaceFirst() for path.