43 regex get the string in a defined middle
Code:Imports System Imports System.Text.RegularExpressions Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim mCollect As MatchCollection = Regex.Matches("sjlfhal{yes}djklafh{yess}", "(?<={).*?(?=})", RegexOptions.IgnoreCase) For Each m As Match In mCollect MsgBox(m.Value) Next End Sub End Class ' output : yes yess




Reply With Quote