Imports System.Text.RegularExpressions
Module Module1
Sub Main
Dim txt As String ="08:Nov:2018 ""This is an Example!"""
Dim re1 As String=".*?"
Dim re2 As String="(x)"
Dim re3 As String="(.)"
Dim r As Regex = new Regex(re1+re2+re3,RegexOptions.IgnoreCase Or RegexOptions.Singleline)
Dim m As Match = r.Match(txt)
If (m.Success) Then
Dim w1=m.Groups(1)
Dim c1=m.Groups(2)
Console.WriteLine("("+w1.ToString()+")"+"("+c1.ToString()+")"+"")
End If
Console.ReadLine()
End Sub
End Module
|