Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- VR.Add(TextBox2.Text) 'Text Box de nome
- VR.Add(ComboBox1.Text) 'Text Box de tipo
- VR.Add(TextBox3.Text) 'Text Box de usando
- Dim finalT As String = GeralTF
- Dim i As Int16 = 0
- For Each regexi As System.Text.RegularExpressions.Regex In V
- finalT = regexi.Replace(finalT, VR(i))
- i += 1
- Next
- RichTextBox1.Text = finalT
- End Sub
- Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
- Dim GeralTF As String = ""
- Dim V As New List(Of System.Text.RegularExpressions.Regex)
- Dim VR As New List(Of String)
- Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
- GeralTF = RichTextBox1.Text
- 'O que substituir
- V.Add(New System.Text.RegularExpressions.Regex("{nome}"))
- V.Add(New System.Text.RegularExpressions.Regex("{tipo}"))
- V.Add(New System.Text.RegularExpressions.Regex("{usando}"))
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement