我想编写一个 Javascript 正则表达式来查找任何给定单词的 KEY(页码)例如在下面的段落中
Key for Chota = 1
Key for Seven = 1 & 2
Key for wonder =3
(就像查找所有页面上都有单词一样)
||1||
Jam Jam jambura jadu tu sikh le aisa
Chota Bheem and Kisna Seven
||2||
One Two Three Bla Bla Bla
Nine Eight Seven Laa Laa Laa
||3||
twinkle twinkle little star
how I wonder what you are
我写了以下表达式,但它不能正常工作
/(?:\|\|)(\d+)(?=\|\|)(?=(.|\n)*wonder)/img;