javascript - Finding the first sentence with jQuery -
I'm trying to find the first sentence of a textarea. Right now, I can find the full stop before and can convert it to an array with I have the following: Is there any way to make it more fully, so it is divided into any form: Any help would be great, Yes there is a way. Do this: I am using .split () , but what happens if they use exclamation marks, question marks, etc. ?
var l = $ ('p'); $ ('Texture') keyboard (function () {var t = $ ('textarea'). Val (); var t = t.split ('.'); L.text (t [0]);}) ;
. ,
. ,
! ,
? ,
enter / linebreak
var t = t.split (/ [\ ?! \. \ n \ r \] /);
regex , in which I am using the character square to define how to split.
html css कोड वेबमास्टर्स के लिए उदाहरण हैं
ReplyDeleteसूची शैली छवि सूची शैली स्थिति कोड उदाहरण