I'm hoping someone can help. I am new to javascript and been struggling with this task all day. After searching through stack overflow and the rest of google - I'm still unable to solve it.
I have a piece of string:
"This is a sentence with a @@DropIn@@ and the sentence is really @@DropIn2@@. I would like to read more sentances because @@DropIn3@@"
What I would like to do extract each of the pieces of string inside of the @@ @@. So ideally the script would bring back:
Dropin
Dropin2
DropIn3.
I have this so far:
var tmpD = tmp.match(" @@(.*)@@ ")
But this brings back this :
"DropIn@@ and the sentence is really @@DropIn2@@. I would like to read more sentances because @@DropIn3"
How can I look for each occurrence?