I want to turn into
What\'s the pattern for this with regex?
Note: The
$html = preg_replace('#(\s*)+#i', '', $html);
This will catch any combination of , , or with any amount or type of whitespace between them and replace them with a single .