I have a string that I need to split into paragraphs. I can easily do this using .split('. '), and appending a '.' char to each string - I then have an array of sentences. Running into issues though as the string may have names with an abbreviated middle name - John D. Doe, for example.
If it wasn't Javascript, I'd use a lookbehind, but it is so I can't.
How can I split the string into a set of sentences, delimited by two or more alphanumeric chars followed by a fullstop?
Thought this would work - .split(/(?:\w{2}\.)\s/g) - but it doesn't include the delimiter in the match, instead I lose the final char and fullstop from each split sentence.