【问题标题】:Find All Items In RichTextBox查找 RichTextBox 中的所有项目
【发布时间】:2017-05-07 08:10:00
【问题描述】:

我有一个.css 文件,我想查找所有以/images_rtl/ 开头并以.png 结尾的字符串,然后将它们添加到列表框中。

编程需要什么样的代码?

【问题讨论】:

  • 判断新字符串何时开始的明确方法是什么?字符串是在自己的线上吗?还是由一个集合字符分隔?
  • @David 不,它没有分开或以新行开头,它有很多代码,我只想找到这样的代码:/image_rtl/ ??? .png
  • @David 这是我的cdn.traviantools.net/game/0.62/layout/css/ltr.css css 文件请检查一下

标签: string vb.net search find richtextbox


【解决方案1】:

做这样的事情......

    For Each item In RichTextBox1.Lines
        ' See if input matches one of these starts.
        If item.StartsWith("/images_rtl/") AndAlso item.EndsWith(".png") Then
            listbox1.items.add(item)
        End If
    Next

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2015-10-21
  • 1970-01-01
  • 2017-05-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-12-03
  • 1970-01-01
相关资源
最近更新 更多