topgun77
2007-02-12 15:08:50 UTC
For example:
Myarray[0] = "this is fun | what time is it? | the sky is blue|";
Myarray[1] = "Yahoo is fun | Answers are good | Go Saints |";
piper = /\|/g;
new_line = "\n";
Myarray[0] = Myarray[0] .replace(piper, new_line);
I want to search and replace all pipes with a newline character "\n". I then want all the arrays to read like this.
Myarray[0] = "this is fun
what time is it?
the sky is blue";
Myarray[1] = "Yahoo is fun
Answers are good
Go Saints ";
I keep getting an Object doesn't support this property or method. I have spent a good deal of time searching for a site that shows Array Search and Replace but to no avail.