Imports System
Public Class Test
Public Shared Sub Main()
Dim texto As String = "def NomeDaVariavel = ValorDela;"
Dim indiceVar As Integer = texto.IndexOf("def")
Dim indiceVal As Integer = texto.IndexOf("=")
Dim tamanhoVar As Integer = Len(indiceVar)
Dim varNome As String = texto.Substring(indiceVar + tamanhoVar, texto.IndexOf("=") - tamanhoVar - 1)
Dim varVal As String = texto.Substring(indiceVal + 2, texto.IndexOf(";") - indiceVal - 2)
Console.WriteLine(String.Format("{0} = {1}", varNome, varVal))
Console.ReadKey()
Dim palavras As String() = texto.Split(New Char() {" "})
Dim palavra As String
For Each palavra In palavras
Console.WriteLine(palavra)
Next
Console.ReadKey()
End Sub
End Class
SW1wb3J0cyBTeXN0ZW0KClB1YmxpYyBDbGFzcyBUZXN0CglQdWJsaWMgU2hhcmVkIFN1YiBNYWluKCkKICAgICAgICBEaW0gdGV4dG8gQXMgU3RyaW5nID0gImRlZiBOb21lRGFWYXJpYXZlbCA9IFZhbG9yRGVsYTsiCgogICAgICAgIERpbSBpbmRpY2VWYXIgQXMgSW50ZWdlciA9IHRleHRvLkluZGV4T2YoImRlZiIpCiAgICAgICAgRGltIGluZGljZVZhbCBBcyBJbnRlZ2VyID0gdGV4dG8uSW5kZXhPZigiPSIpCgogICAgICAgIERpbSB0YW1hbmhvVmFyIEFzIEludGVnZXIgPSBMZW4oaW5kaWNlVmFyKQoKICAgICAgICBEaW0gdmFyTm9tZSBBcyBTdHJpbmcgPSB0ZXh0by5TdWJzdHJpbmcoaW5kaWNlVmFyICsgdGFtYW5ob1ZhciwgdGV4dG8uSW5kZXhPZigiPSIpIC0gdGFtYW5ob1ZhciAtIDEpCiAgICAgICAgRGltIHZhclZhbCBBcyBTdHJpbmcgPSB0ZXh0by5TdWJzdHJpbmcoaW5kaWNlVmFsICsgMiwgdGV4dG8uSW5kZXhPZigiOyIpIC0gaW5kaWNlVmFsIC0gMikKCiAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoU3RyaW5nLkZvcm1hdCgi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