Here is a minimal example of my problem:
http://jsfiddle.net/pm913emb/5/
var string = 'Question 6 of 7 '
+'Three, the patient suddenly develops shortness of breath and becomes hypotensive. His heart rate is 100/min, with a normaI PR and QRS intervaI.'
var sentencesMatch = string.match(/([\sa-zA-Z\d]){1}.+?[\.!\?]{1}([\s ]+|$)/g);
console.log(sentencesMatch);
As you can see, this string contains multiple sentences and there are two places where I have added multiple spaces: one is at the end of the sentence, the other in middle of the sentence. There is regex, which I run on this string.
The problem is: As you can see in the console, the matched results does not contain these multiple spaces.
What could be the reason of this problem. And possible solution?
Please help.. :/