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(/[\.!?]/);
which works but does not include the ending punctuation for each sentence (.!?).
Does anyone know of a way to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…