过滤字符串中连续数字问题
Regex regex1 = new Regex(@"\d{7,18}");
html = regex1.Replace("<div> <strong>好了</strong><img src='http://www.baidu.com/images/aa/
123456789.gif' > <div> <b>好了</b> 专家:010-64021966QQ:2416144277 <p> <nobr> <span></span> </nobr> </p> <p> </div>", "");
想过qq号码和电话,结果连图片的数字也过滤了,怎么写才能只过滤标签外的
------解决方案--------------------Regex regex1 = new Regex(@"(?<=>[^<>]*?)\d{7,18}(?=[^<>]*?<)");
------解决方案--------------------
++1