Get a specific word of of the sentence
- by sm21guy
H
ow can i get 123 out of ::123:: in a sentence then store it in a variable.
for example :
hi i am john ::123::.
It will look for :::: tags and get 123 from the it and strip off other words in the sentence.
The results would be 123
I am not sure but is this able to work?
$(document).ready(function(){
var store = $('.div').find(/::([^:]+)::/g);
alert(store);
});
How can i do this using jquery?