3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "Je naam (verplicht) [text* your-test] Je e-mailadres (verplicht) [email* your-tester] Onderwerp [text your-testerer] Je bericht [textarea your-testererer] [area-without-attribute]"; if (preg_match_all('~\[(?:\w+\*?\s+)?([^][]+)]~', $text, $matches)) { print_r($matches[1]); }

preferences:
133.79 ms | 405 KiB | 5 Q