【发布时间】:2014-02-15 08:38:02
【问题描述】:
我想将 html 中的所有 animal[0] 替换为 animal[1]。
但我不想在同一个 html 中将 tiger[0] 替换为 tiger[1]。
例如,
<input type="hidden" name="animal[0].tiger[0].prey"/>
到
<input type="hidden" name="animal[1].tiger[0].prey"/>
【问题讨论】:
-
你有没有尝试过?似乎您甚至不需要正则表达式来执行此操作,除非您没有提到更多...
标签: javascript jquery regex