I have a string like:
some people may work for some thing new.
I need to fetch the 2nd instance of the word 'some' using javascript reg exp.
how can i get that?
here is my try:
var text = "some people may work for some thing new";
var patt = /some/.test(text);
console.log(patt);
But I am getting simply 'true' in console. But I need to get the word to be consoled. ( even i may need to replace too).
any one help me?