3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subject = "text text text text [helloo] text [hello2] (hello3) text"; $pattern = '/\[(.+?)\]/is'; preg_match_all($pattern, $subject, $matches); print_r($matches);

preferences:
59.23 ms | 402 KiB | 5 Q