simpler regex-replace for path