fudmario Posted July 17, 2014 Share Posted July 17, 2014 [LENGUAJE=vbnet] Public Function sSplit(ByVal cadena As String, ByVal del1 As String, ByVal del2 As String) Try Dim Res As String Dim s, b As Short s = cadena.IndexOf(del1) + del1.Length + 1 ' b = cadena.Substring(s).IndexOf(del2) + 1 ' Res = Mid(cadena, s, b) Return Res Catch ex As Exception Return "" End Try End Function [/LENGUAJE] [LENGUAJE=vbnet] 'Ejemplo de Uso: 'Dim total As String = "Hola que tal esto es un ejemplo en vbnet por fudmario" 'MessageBox.Show(sSplit(total, "tal", "en")) 'devuelve:"esto es un ejemplo "[/LENGUAJE] Link to comment Share on other sites More sharing options...
Recommended Posts