# Flash 8 String replace issues

**URL:** <https://forum.kirupa.com/t/flash-8-string-replace-issues/307874>\
**Category:** flash\
**Created:** [April 12, 2010, 3:52pm UTC](https://forum.kirupa.com/t/flash-8-string-replace-issues/307874 "2010-04-12T15:52:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![freefallingup](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@freefallingup](https://forum.kirupa.com/u/freefallingup)\
**Post date:** [April 12, 2010, 3:52pm UTC](https://forum.kirupa.com/t/flash-8-string-replace-issues/307874/1 "2010-04-12T15:52:14Z")

</div>

I am trying something that seems pretty simple, but i’m stuck.  
What I am trying to do is take a string that says “play: watch preview” and make it say only “watch preview”

```auto
if (showButton02.indexOf ("play:") !=1){
        showButton02.replace("play:", "");
        trace("HERE IS THE STRING WITHOUT PLAY!"+showButton02);

```

Any help would be appreciated!
