I’ve got a textarea with several senteces.(. is a divider). How to get array of sentences?
I mean for example. hello world. it's hello world.hello. and the result array is – [hello world], [it's hello world], [hello]
I’ve got a textarea with several senteces.(. is a divider). How to get array
Share
You should use the
splitmethod.http://www.w3schools.com/jsref/jsref_split.asp
var sentenceArray = str.split(“\. |\.”)