how to get last typed or pasted substring in a text box using javascript
<p>i have a scenario i which i want to get the substing that was typed or pasted at the last position in the TextBox </p>

<p>eg: when i type " hello how are you  "</p>

<p>-- it alerts for each words ie. </p>

<p>alert 1: hello </p>

<p>alert 2: how </p>

<p>alert 3: are </p>

<p>alert 4: you</p>

<p>but if i paste "HelloHowareYou" it will alert HelloHowareYou</p>

<p>i get the last cursor position by caret function but i am not able to proceed further for getting the last substing from the string . for performance optimisation i dont want to use split function</p>
