Dim objRegEx As System.Text.RegularExpressions.Regex
Dim objMatch As System.Text.RegularExpressions.Match
' Create regular expression
objRegEx = New System.Text.RegularExpressions.Regex( _
"\b(\w+)\s+\1\b", _
System.Text.RegularExpressions.RegexOptions.IgnoreCase _
Or System.Text.RegularExpressions.RegexOptions.Compiled)
' Match our text with the expression
objMatch = objRegEx.Match("Why didn't they they ask ask Evans?")
' Loop through matches and display captured portion in MessageBox
While objMatch.Success
Dim strMatch As String
strMatch = objMatch.Groups(1).ToString
MessageBox.Show(strMatch)
objMatch = objMatch.NextMatch()
End While
Please SUBSCRIBE to get new articles directly into your Email inbox!
Dim objMatch As System.Text.RegularExpressions.Match
' Create regular expression
objRegEx = New System.Text.RegularExpressions.Regex( _
"\b(\w+)\s+\1\b", _
System.Text.RegularExpressions.RegexOptions.IgnoreCase _
Or System.Text.RegularExpressions.RegexOptions.Compiled)
' Match our text with the expression
objMatch = objRegEx.Match("Why didn't they they ask ask Evans?")
' Loop through matches and display captured portion in MessageBox
While objMatch.Success
Dim strMatch As String
strMatch = objMatch.Groups(1).ToString
MessageBox.Show(strMatch)
objMatch = objMatch.NextMatch()
End While
Please SUBSCRIBE to get new articles directly into your Email inbox!
تعليقات
إرسال تعليق