I need to separate each sentence from text into an array item using jQuery.
Let's say I have this text:
jQuery Fundamentals is designed to get you comfortable working through common problems you'll be called upon to solve using jQuery. Both versions 1.x and 2.x of jQuery support "current-1 versions" (meaning the current stable version of the browser and the version that preceded it) of Firefox, Chrome, Safari, and Opera.
I need to achieve this result:
Array (
[0] = "jQuery Fundamentals is designed to get you comfortable working through common problems you'll be called upon to solve using jQuery."
[1] = "Both versions 1.x and 2.x of jQuery support "current-1 versions" (meaning the current stable version of the browser and the version that preceded it) of Firefox, Chrome, Safari, and Opera."
)
Note that in the sentences there might be "." or other symbols, so I'm not sure if .split() will achieve the proper result.
I prefer to write code my own, so it will be great if answers suggest only the method achieving the result, or your thoughts of doing it.