3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = ' input { redis { host => "192.168.2.17" type => "nginx access" data_type => "list" key => "nginx access" password => "v5XBbZHcbaKFQr3kRFLqjZV5" } redis { host => "192.168.1.33" type => "nginx access" data_type => "list" key => "nginx access" password => "v5XBbZHcbaKFQr3kRFLqjZV5" } } input { redis { host => "192.168.2.17" type => "nginx access" data_type => "list" key => "nginx access" password => "v5XBbZHcbaKFQr3kRFLqjZV5" } redis { host => "192.168.1.33" type => "nginx access" data_type => "list" key => "nginx access" password => "v5XBbZHcbaKFQr3kRFLqjZV5" } } '; preg_match_all('~\{(?:[^{}]|(?R))*\}~', $input, $sectors); print_r($sectors);

preferences:
32.86 ms | 402 KiB | 5 Q