<?php $string = "This is a short sentence which should include all regex results"; echo preg_replace(array('/\b(\w{1,3})\b/', '/\b(\w{4,})\b/'), array('$1*', '+$1*'), $string);
You have javascript disabled. You will not be able to edit any code.