Currently I am exploding a string at .
and it works as I like. the only issue is that is also explodes when the .
occurs as a decimal point. Is there a
If need to explode text like in your example, an easy way to do it is to explode ". " instead of ".".
$String = "This is a string. It will split at the previous point and the next one. Here 7.9 is a number";
$NewString = explode('. ', $String);
print_r($NewString);
output
Array (
[0] => This is a string
[1] => It will split at the previous point and the next one
[2] => Here 7.9 is a number
)