Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('input.words_input__input_field').on("keyup", function(e) {
- if (e.keyCode == 13) {
- send_message();
- }
- var re = /^(((['-+s]s*[a-zA-Z])?[a-zA-Z]*)){3}$/g;
- var str = $('input.words_input__input_field').val();
- var m;
- while ((m = re.exec(str)) !== null) {
- if (m.index === re.lastIndex) {
- re.lastIndex++;
- }
- send_text = str;
- // View your result using the m-variable.
- // eg m[0] etc.
- }
- console.log(m);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement