I have found a similar thread already where I got:
$sentence = preg_replace('/(.*?[?!.](?=\s|$)).*/', '\\1', $string);
This doesn't seem to work in my function though:
<?function first_sentence($content) {
$content = html_entity_decode(strip_tags($content));
$content = preg_replace('/(.*?[?!.](?=\s|$)).*/', '\\1', $content);
return $content;
}?>
It seems to be not taking into account the first sentence when a sentence ends as the end of a paragraph. Any ideas?