```
$restricted_images = array(
    "http://api.tweetmeme.com/imagebutton.gif",
    "http://stats.wordpress.com",
    "http://entrepreneur.com.feedsportal.com/",
    "http://feedads.g.doubleclick.net"
);

```

This are the list of images that I want to know if a certain string has that kind of string.

For example:

```
$string = "http://api.tweetmeme.com/imagebutton.gif/elson/test/1231adfa/".

```

Since `"http://api.tweetmeme.com/imagebutton.gif"` is in the `$restricted_images` array and it is also a string inside the variable `$string`, it will replace the `$string` variable into just a word `"replace".`

Do you have any idea how to do that one? I'm not a master of RegEx, so any help would be greatly appreciated and rewarded!

Thanks!