I'm using the regex that was accepted as an answer in this question to split sentences, but the regex is not compatible in safari since it does not support negative lookbehinds (yet).
(?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|\?)\s
The regex splits the following string:
Mr. Smith bought cheapsite.com for 1.5 million dollars, i.e. he paid a lot for it. Did he mind? Adam Jones Jr. thinks he didn't. In any case, this isn't true... Well, with a probability of .9 it isn't.
Into:
[
"Mr. Smith bought cheapsite.com for 1.5 million dollars, i.e. he paid a lot for it."
"Did he mind?"
"Adam Jones Jr. thinks he didn't."
"In any case, this isn't true..."
"Well, with a probability of .9 it isn't."
]
It's basically a sentence extractor from a string.
Any ideas on how to make it compatible with safari?