<?php $string="{1},[2],(3),<4>"; $string = preg_replace_callback('~([{[<])|[]}>]~', function ($m) { return !empty($m[1]) ? "(" : ")"; }, $string); echo $string;
You have javascript disabled. You will not be able to edit any code.