2020年7月6日 星期一

vb.net 取得兩個關鍵字中間的字串 [Get string into two string]


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
    Private Function GetInternalText(strAll As String, strLeft As String, strRight As String) As String
        Dim strText As String = ""
        Try
            'strText = Split(strAll, strLeft)(1)
            strText = Split(strAll, strLeft, 2)(1)
            strText = Split(strText, strRight)(0)
        Catch ex As Exception

        End Try
        Return Trim(strText)
    End Function

沒有留言:

張貼留言