简体   繁体   English

使用正则表达式检索特殊字符

[英]Retrieving special characters using regular expressions

I am trying to retrieve some information from a website using regular expression. 我正在尝试使用正则表达式从网站检索一些信息。 I ended up with an output containing html entity for a special character. 我最终得到一个包含html实体的特殊字符输出。

For example, instead of Côté I am getting Côt&eacute . 例如,我得到的不是Côté而是Côt&eacute

Please help in retrieving the actual string. 请帮助检索实际的字符串。 TIA. TIA。

HtmlDecode应该适合您: http : //msdn.microsoft.com/zh-cn/library/7c5fyk1k.aspx

s = HttpUtility.HtmlDecode(s)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM