有啊,用正則表達(dá)式,下面是簡單的例子

創(chuàng)新互聯(lián)建站專注于武義網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠為您提供武義營銷型網(wǎng)站建設(shè),武義網(wǎng)站制作、武義網(wǎng)頁設(shè)計(jì)、武義網(wǎng)站官網(wǎng)定制、微信小程序服務(wù),打造武義網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供武義網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。
Imports?System.Text.RegularExpressions
Public?Class?Form1
Private?Sub?Button1_Click(ByVal?sender?As?System.Object,?ByVal?e?As?System.EventArgs)?Handles?Button1.Click
Dim?str?As?String?=?"ABCDAEAFAG"
Dim?Patter?As?String?=?"A"
Dim?Matches?As?MatchCollection?=?Regex.Matches(str,?Patter,?RegexOptions.IgnoreCase?Or?RegexOptions.ExplicitCapture)
For?Each?ws?In?Matches
ListBox1.Items.Add("索引位置:"??ws.index)
Next
End?Sub
End?Class
dim st as string = "qwertyuiop"
msgbox(st.indexof("p"))
若為-1,則表示不存在
簡單點(diǎn)寫。
Module Program
Sub Main()
Console.WriteLine("Hello World!")
Dim t As String, a() As String, c As Integer
t="/admin/index/login/defasd.php"
a=t.Split("/"c)
c=0
For Each p In a
If c0 Then
Console.WriteLine("/"+p)
End If
c+=1
Next
Console.Write("Press any key to continue . . . ")
Console.ReadKey(True)
End Sub
End Module
========
Hello World!
/admin
/index
/login
/defasd.php
字符串中指定文字位置查詢,如:instr("inter","er")?
返回待判斷字符串在原字符串中第一次出現(xiàn)的位置,如果不包含的話返回0
網(wǎng)站題目:vb.net字符串查詢,vb字符串函數(shù)大全
本文URL:http://chinadenli.net/article1/dsgipod.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供靜態(tài)網(wǎng)站、、網(wǎng)站設(shè)計(jì)公司、外貿(mào)網(wǎng)站建設(shè)、網(wǎng)站制作、外貿(mào)建站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)