开发者

Javascript regular expression that replaces html tags

I want to use a regular expression in javascript to replace all occurances of

</tr><tr>

with

<td>&nbsp;&nbsp;</td>

Also, there can be whitespace between the </tr> tag 开发者_StackOverflow中文版and the <tr> tag

Thanks!!


result = subject.replace(/<\/tr>\s*<tr>/g, "<td>&nbsp;&nbsp;</td>");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜