-
split indexOf?
Hi, this might sound kind of noobish, just wondering if you can do something like:
mytext=mytext.split(mytext.indexOf("cat")).join("d og")
Because if I had a sentence:
I love to pet my cat. My cat is so nice.
I would only want to replace the first "cat", not the second. Split/join will replace both. Just wondering if there's a way. (p.s. actionscript 2, so cant do "replace" I dont think)
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|