3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo preg_replace('/(\{([\w-]+)\})/sU', '<span id="\\2"></span>', 'Qwe {test}, {testie}, {yes-valid}, {with-7digits}, {not valid}');
based on A6MRd
Output for 4.3.0 - 7.2.0
Qwe <span id="test"></span>, <span id="testie"></span>, <span id="yes-valid"></span>, <span id="with-7digits"></span>, {not valid}