正则去除超链接

if (!result.Contains("baidu"))
                                        {
                                            System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(@"(?is)</?a[^>]*>(?:(?!</?a).)*</a>");
                                            string result2 = reg.Replace(result, "");

                                           
                                            if (result2 != "")
                                            {
                                             
                                                bll.UpdateField(id, "QContext='" + result2 + "'");
                                                
                                            }
                                        }
原文地址:https://www.cnblogs.com/alaric888/p/4939684.html