<?php $str="dfgdfgdfg <{nameuser}> <{user}> dfgdfgdfg";$arrMatches=array();$pattern="/([<][\{][a-z]+[\}][>])/";preg_match_all($pattern,$str,$arrMatches);print_r($arrMatches);
Standard input is empty
Array ( [0] => Array ( [0] => <{nameuser}> [1] => <{user}> ) [1] => Array ( [0] => <{nameuser}> [1] => <{user}> ) )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!