<?php $str = "This is a {cat} with {big} eyes."; preg_match_all("/\{[^}]+\}/", $str, $matches); var_dump($matches);
Standard input is empty
array(1) { [0]=> array(2) { [0]=> string(5) "{cat}" [1]=> string(5) "{big}" } }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!