Hi it's example script: <?php $string = "This is some _color:pink_ colored text _color_"; $patterns[0] = '/_color:(.*?)_/'; $patterns[1] = '/_color_/'; $replacements[0] = '<font color="$1">'; $replacements[1] = '</font>'; echo preg_replace($patterns, $replacements, $string); ?> It should be ok, but i don't test it. Pawel