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 ="(?:[a-z][a-z]+)"
Dim re3 As String=".*?"
Dim re4 As String="((?:[a-z][a-z]+))"
Dim re5 As String="( )"
Dim r As Regex = new Regex(re1+re2+re3+re4+re5,RegexOptions.IgnoreCase Or RegexOptions.Singleline)
Dim m As Match = r.Match(txt)
If (m.Success) Then
Dim word1=m.Groups(1)
Dim ws1=m.Groups(2)
Console.WriteLine("("+word1.ToString()+")"+"("+ws1.ToString()+")"+"")
End If
Console.ReadLine()
End Sub
End Module
|