< =...> 中的正则表达式问题
http://community.csdn.net/Expert/topic/3758/3758013.xml?temp=.4369318
我想把
<td rowspan=2 class=xl32 width=83 >class=x343 </td>
替换为
<td rowspan="2" class="xl32" width="83" >class=x343 </td>
即:
< ....>中等号后面的数加上引号;
我用 (?<==)(?!["])(['a-z:0-9]+) 替换为:"$1"
Regex.Replace(string,@"(?<==)(?!["])(['a-z:0-9]+) ","$1");
结果成了
<td rowspan="2" class="xl32" width="83" >class="x343" </td>
如何限制匹配的内容在 < > 中间?