<?php $tokens = [ ]; $regex = '/#([a-zA-z0-9_]+)(:[a-zA-Z]+)/'; $pattern = '#nombre:tipo'; echo preg_replace($regex, "(?<$1>$2)$2", $pattern);
You have javascript disabled. You will not be able to edit any code.