1. 程式人生 > >判斷textbox的正則集

判斷textbox的正則集

判斷文字的正則   content=content.Replace("&#8220;","“");            content=content.Replace("&#8221","”");            content = Regex.Replace(content, @"(<[b|B][r|R]/*>)+|(<[p|P](.|/n)*?>)", "/r/n");    //<br>            content = Regex.Replace(content, @"(/s*&[n|N][b|B][s|S][p|P];/s*)+", " ");    //&nbsp;            content = Regex.Replace(content, @"<(.|/n)*?>", string.Empty);    //any other tags            content = Regex.Replace(content, @"/<//?[^>]*>/g", string.Empty);    //any other tags            content = Regex.Replace(content, @"/[    | ]* /g", string.Empty);    //any other tags            content = Regex.Replace(content, @"/ [/s| |    ]* /g", string.Empty);