bratsun
5/30/2014 - 6:41 PM

Preg replace all words shorter than X and chars except letters and '

Preg replace all words shorter than X and chars except letters and '

$output = trim( preg_replace(
  "/[^a-z0-9']+([a-z0-9']{1,2}[^a-z0-9']+)*/i",
  " ",
  " $output "
) );