---
title: "nybörjare har replace() problem"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/7859-nybörjare-har-replace-problem"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "Daniel78"
published: "2001-01-25T08:36:00.000Z"
updated: "2001-01-25T10:31:00.000Z"
replies: 1
views: 155
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/7859-nybörjare-har-replace-problem"
---

# nybörjare har replace() problem

## #1 — Daniel78, 2001-01-25T08:36Z

Behöver hjälp med att byta ut tecknet "," från ett formulär till ett tab-tecken när raden skrivs till en text fil. Som det ser ut nu skrivs en blankrad bara! Koden ser ut så här:
\<%
	Const ForAppending = 8
	Dim objOpenFile, objFSO, strPath, strNytt, strChange
	strNytt = Request.Form("url")
	strChange = Replace(strNytt,",","	")
	strPath = Server.MapPath("navigation/test.txt")
	Set objFSO =\_
		Server.CreateObject("Scripting.FileSystemObject")
	If objFSO.FileExists(strPath) Then
		Set objOpenFile=\_
			objFSO.OpenTextFile(strPath, ForAppending)
	Else
		Set objOpenFile=\_
			objFSO.CreateTextFile(strPath)
	End if
	objOpenFile.WriteLine Request.Form("strNytt")
	objOpenFile.Close
	Set objOpenFile = Nothing
	Set objFSO = Nothing
%\>

Permalänk: https://www.webforum.nu/p/7859

## #2 — emission, 2001-01-25T10:31Z

Välkommen hit!!

objOpenFile.WriteLine replace(Request.Form("strNytt"),",",vbtab)

Permalänk: https://www.webforum.nu/p/254341

---

Tråden på webben: https://www.webforum.nu/amne/asp/7859-nybörjare-har-replace-problem
