Suppose, I want to split a string based on delimiter. So I'd simple do a explode('. ', $myString)
. But, this strips out if there are any abbreviations present like U.K.
or U.S.
.
So, how could I use explode keeping all abbreviations intact.
Abbreviations will be of the form: X.Y.Z
While sentences would be separated by .
For example, The U.S. is a country. It's in N.America.
should result in:
[0] = The U.S. is a country.
[1] = It's in N.America.