I parsed some texts from web with multiple useless strings with certain pattern as demonstrated below.

```
Some Text1adCommands.push(function(ads){ads.prime("mid_leaderboard_rectangle_9")});Some Text2adCommands.push(function(ads){ads.prime("mid_leaderboard_rectangle_10")});Some Text3adCommands.push(function(ads){ads.prime("mid_leaderboard_rectangle_11")});Some Text4

```

I would like to replace the string with the substring `"function(ads {ads.prime("mid_leaderboard_rectangle_%d")});"` to empty space. How can I do that with str.replace or regular expression? The expected output should be something like:

```none
Some Text1  Some Text2  Some Text3  Some Text4

```

I have tried `str.replace("function(ads {ads.prime("mid_leaderboard_rectangle_%d")});", " ")` but it won't work.