首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >删除Doubleqoutes并插入字符

删除Doubleqoutes并插入字符
EN

Stack Overflow用户
提问于 2017-06-09 04:55:04
回答 1查看 69关注 0票数 0

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

  1. 将数字1和2替换为Q1和Q2,以及
  2. 删除所有引号。

  1. 根据福布斯和霍拉尼克(见Kulig & Williams,2012年),以下哪一个是患有痴呆的农村居民的独特特征? 他们不太可能有一个成年的孩子来帮助他们照顾他们。他们在痴呆症诊断方面有延迟。C.人们更不愿意接受专门护理。他们的痴呆发病时间往往比城市晚。
  2. 一位护士对在职员工的发展说三道四.护士参与者的哪一项声明显示了教育的必要性?

一个。“我知道,歧视的后果仍然存在,它们与健康差距有关。”B.“我相信,我们花在少数客户身上的护理时间一定会增加。”结果表明,C.“有些人可能错误地认为,由于加拿大有一个普遍的医疗保健体系,所以几乎没有什么健康差距。”D。“将特定疾病的流行与特定的少数群体联系起来是不准确的。”

我尝试过这段代码,但它不起作用:

代码语言:javascript
复制
For i = 0 To Val(textcon.Lines.Count) - 1

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

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-06-09 05:20:54

试试这个(简单双引号为):

代码语言:javascript
复制
For i = 0 To Val(TextBox1.Lines.Count) - 1
       If TextBox1.Lines(i).Contains(Chr(34)) Then
            TextBox1.Text = TextBox1.Text.Replace(Chr(34), "")
       End If
Next
TextBox1.Text = TextBox1.Text.Replace("1.", "Q1 ")
TextBox1.Text = TextBox1.Text.Replace("2.", "Q2 ")

试试这个(表示卷双引号):

代码语言:javascript
复制
For i = 0 To Val(TextBox1.Lines.Count) - 1            
     TextBox1.Text = TextBox1.Text.Replace(Chr(148), "")
     TextBox1.Text = TextBox1.Text.Replace(Chr(147), "")
Next
TextBox1.Text = TextBox1.Text.Replace("1.", "Q1 ")
TextBox1.Text = TextBox1.Text.Replace("2.", "Q2 ")

有不同类型的双引号,您可以引用 这里中的字符代码

尝试使用以下内容:(我已经将卷引号更改为直引号)

代码语言:javascript
复制
1. 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.

2. 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."
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44449562

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档