3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = <<<DATA this will = ({match1}) this should = not ({match2}) ({match3}) DATA; $pattern = "~[^\w\s]\h*\K\({\w+}\)~"; preg_match_all($pattern, $data, $matches); print_r($matches[0]);

preferences:
116.2 ms | 1369 KiB | 5 Q