Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

split sentence including special characters javascript

let paragraph = 'Good Morning! How are you? This is John. John is my friend.';
let sentences = paragraph.split(/([!,?,.])/);
console.log(sentences);
Code language: JavaScript (javascript)
Source by www.javascripttutorial.net #
 
PREVIOUS NEXT
Tagged: #split #sentence #including #special #characters #javascript
ADD COMMENT
Topic
Name
5+7 =