# Substitute "|" for " "

**URL:** <https://forum.kirupa.com/t/substitute-for/187965>\
**Category:** Uncategorized\
**Created:** [May 3, 2006, 1:12pm UTC](https://forum.kirupa.com/t/substitute-for/187965 "2006-05-03T13:12:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Only\_Dust](https://avatars.discourse-cdn.com/v4/letter/o/f1d935/32.png) [@Only\_Dust](https://forum.kirupa.com/u/Only_Dust)\
**Post date:** [May 3, 2006, 1:12pm UTC](https://forum.kirupa.com/t/substitute-for/187965/1 "2006-05-03T13:12:13Z")

</div>

I have a dynamic text and in it I pull a value that I places in the PARAM of my HTML, like this, " …&p1=de|R$+9,49|por|R$+799,58 ", I am trying to make the following one, show the value in the dynamic text, " R$+799,58 “, without the “de” or “|” or “por”, I already tried to make this.  
[AS]  
var valorDe:String = “!”;  
var valorPosicao:Number = \_root.p1.text.indexOf (valorDe);  
if (valorPosicao \>=0) {  
\_root.p1.removeTextField (0, valorPosicao, " “);  
}[/AS]  
and this  
[AS]  
if (p1.indexOf (”|”) \>= 0) {  
p1 = ‘’;  
}  
[/AS]  
but nothing works.

Sorry about my English
