I would like to filter the images by checking its extension, and my coding is as below:

```
preg_match_all("/<img.*?src=\"(.*?)\".*?\/>/i", $this->content, $resultImg);

```

and the result will be like this:

```
Array (
     [0] => xxx/logo.png?1253 
     [1] => xxx/banner.jpg?1253 
     [2] => xxx/6606072563_a9d41ef0ca_z_medium.jpeg?1253 
     [3] => xxx/6605789711_43e2ca1f0d_z_medium.bmp?1253 
)

```

But the system just accept jpg, png & gif, may I know how can I remove the image URL which extension is not jpg, png & gif by using the coding above?

Thanks all