从HTML页面发出阅读文本问题 [英] Issue reading text from HTML page

查看:76
本文介绍了从HTML页面发出阅读文本问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


大家好,我正在从html文件中读取一些字符串,字符串显示为2x2 & nbsp; s in html。据我所知,这包含非破坏
的空间。但是在用C#app阅读之后。如何检查字符串是否包含
& nbsp
。我曾尝试过几次,但没有奏效。他们甚至无法检测到该字符串有& nbsp; 。但是如果我正在比较 2x2 s 与我从html
2x2 s 收到的字符串。比较在这里失败。任何想法?

Hi All, I am reading some string from html file the string is appearing as 2x2 s in html. I understand that this contain non breaking space . But after reading them in C# app . How do i check if string contain &nbsp or not. I had tried couple of way but they didn't worked. They even are not able to detect that string has   .But if i am comparing  2x2 s with the string which i had received from html 2x2 s.The comparison is failing here .Any idea?


 if(strText.Contains("\\u00A0"))
       strText = Regex.Replace(strText, "\u00A0", " ");





Thanks


Thanks

Rupesh Shukla

Rupesh Shukla

推荐答案

你有没有试过"\ u00A0"代替"\\\\00A0"?


这篇关于从HTML页面发出阅读文本问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆