我希望有人可以提供帮助。我是javascript的新手,整天都在努力完成这项任务。在搜索堆栈溢出和谷歌的其余部分之后 - 我仍然无法解决它。
我有一根绳子:
"This is a sentence with a @@DropIn@@ and the sentence is really @@DropIn2@@. I would like to read more sentances because @@DropIn3@@"
我想要做的是提取@@ @@中的每个字符串。理想情况下,脚本会带回来:
Dropin
Dropin2
DropIn3.
到目前为止,我有这个:
var tmpD = tmp.match(" @@(.*)@@ ")
但这会带来这个:
"DropIn@@ and the sentence is really @@DropIn2@@. I would like to read more sentances because @@DropIn3"
我如何查找每次出现?