if you want to replace all occurrences of of ' ' with '|', then, as CasimiR said, use StrTran function.
if you want to replace only certain occurrences, here's an outline of a function that you will need to use (of course there are other ways too):
<font class="small">Code:</font><hr /><pre>
string ReplaceStr (string sSearchStr, string sReplaceStr)
loop through each character of the string
if current character is sSearchStr
replace it with sReplaceStr
In essence, what I said here does exactly the same as StrTran would, but you can modify it to fit your needs. For example, if you want to replace ' ' with '|' only if character before ' ' was a 2nd '"', then you can put that logic in that function.