Ver original<?php $string = '[ img]234234234[/ img] [ img]asdasdasd[/ img] [ img]algo[/ img]'; $pattern = '/\[ img\](.*?)\[\/ img\]/si'; preg_match_all($pattern, $string, $result); print_r($result);?>