Use match[0] instead of pattern during replacement