删除doubleqoutes并插入一个字符 [英] Remove doubleqoutes and insert a character

查看:66
本文介绍了删除doubleqoutes并插入一个字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在多行文本框中有以下两段,我想:



用Q1和Q2替换数字1和2,

删除所有报价。

根据福布斯& Hawranik(发现于库利格和威廉姆斯,2012年),以下哪一个是痴呆症农村居民的独特特征?



A.他们不太可能拥有一个成年子女,以帮助他们照顾。 B.他们经历了痴呆症诊断的延迟。 C.更不愿意接受专门护理。 D.他们的痴呆症发病率往往高于城市痴呆症。

护士在服务人员发展时说话。护士参与者的哪一项陈述表明需要接受教育?

A.我知道歧视的后果仍然存在,而且与健康差异有关。B。我确定我们与少数族裔客户合作的客户服务时间百分比必然会增加。C。有些人可能会错误地认为健康差异很小,因为加拿大有一个全民医疗保健系统。D。链接不准确特定少数群体特定疾病的患病率。



我尝试过的事情:



我试过这段代码但无济于事



For i = 0 To Val(textcon.Lines.Count) - 1



如果textcon.Lines(i).Contains(Chr(34))那么

MyStringBuilder.Replace(Chr(34),#)

结束如果

next



请帮助

解决方案

< blockquote>请注意那些引号不是t'',它们是文本处理器特殊引号:开头是''',最后是'''。

试试这个:

  Dim  s  As   String  = myTextBox.Text 
s = s.Replace( 1 Q1
s = s.Replace( 2 Q2
s = s.Replace(
s = s.Replace( ,)
s = s.Replace(

myTextBox。 Text = s


是的,你说得对,这就是为什么我不能上班的原因



 MyStringBuilder.Replace(ans,} :: Q& y& ::)。替换(Chr(147),)。替换(Chr(148),)





i已经使用了这个并且它正在工作,感谢Jay Patel - 查看chr代码



并且也谢谢你。


I have the two paragraphs below in a multiline textbox and I want to:

Replace the numbers 1 and 2 with Q1 and Q2, and
Remove all the quotes.
According to Forbes & Hawranik (found in Kulig & Williams, 2012), which of the following is a unique characteristic of rural residents with dementia?

A. They are less likely to have an adult child to assist them with care. B. They experience a delay in dementia diagnosis. C. There is a greater reluctance in accepting specialized care. D. They tend to have a later onset of dementia than their urban counterparts.
A nurse speaks at a staff development in-service. Which statement by a nurse participant shows the need for education?
A. "I know that the consequences of discrimination are still present and they're linked to health disparities." B. "I'm sure the percentage of client-care hours that we spend working with minority clients is bound to increase." C. "Some may erroneously assume that there are few health disparities because Canada has a universal health care system." D. "It's inaccurate to link the prevalence of particular diseases with particular minority groups."

What I have tried:

I have tried this code but to no avail

For i = 0 To Val(textcon.Lines.Count) - 1

If textcon.Lines(i).Contains(Chr(34)) Then
MyStringBuilder.Replace(Chr(34), "#")
End If
next

Help please

解决方案

Note that those quotes aren't '"', they are text processor "special quotes": '"' at the beginning, and '"' at the end.
Try this:

Dim s As String = myTextBox.Text
s = s.Replace("1", "Q1")
s = s.Replace("2", "Q2")
s = s.Replace("""", "")
s = s.Replace(""", "")
s = s.Replace(""", "")
myTextBox.Text = s


Yes you are right the quotations are different that is why I cant get to work

MyStringBuilder.Replace(ans, "}::Q" & y & "::").Replace(Chr(147), "").Replace(Chr(148), "")



i have used this and it is working thanks to Jay Patel--for looking in the chr codes

and thank you too.


这篇关于删除doubleqoutes并插入一个字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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