文本:
god is a <span class="linkText0" name="name1">good</span> god my <span class="linkText1" name="name2">friend</span>
预期(删除<span>..</span>
给定的name
匹配项)
god is a good god my <span class="linkText1" name="name2">friend</span>
我的正则表达式:
/<span[^]+name=\"name2\">([^]+)</span>/g
结果:
god is a friend
请帮忙改正