1.Create a string
const paragraph = 'The Answer to the Ultimate Question of Life, the Universe, and Everything is 42. Forty two. That's all there is.';
2.Split string by sentences
// Split by sentences const sentences = paragraph.split(/[!?.]/); console.log(sentences);
Here /[!?.]/ is the regular expression.