I am trying to use javascript\'s split to get the sentences out of a string but keep the delimiter eg !?.
So far I have
sentences = text.split(/[\\\
Try this instead:-
sentences = text.split(/[\\.!\?]/);
? is a special char in regular expressions so need to be escaped.
?
Sorry I miss read your question - if you want to keep delimiters then you need to use match not split see this question
match
split