How to replace and split a string having "|","$","^" as delimiter using Regex in VB.net?

Rajnilari2015
Posted by Rajnilari2015 under VB.NET category on | Points: 40 | Views : 896
Imports System.Linq
Imports System.Text.RegularExpressions

Namespace ConsoleApplication1
Class Program
Private Shared Sub Main(args As String())
'replacing with *
'split with *
New Regex("[|$^]+").Replace("RNATeam|Rajlaxmi$Niladri^Arina", "*").Split("*"C).ToList().ForEach(Function(i) Console.WriteLine(i))
End Sub
End Class
End Namespace



Output
--------


RNATeam
Rajlaxmi
Niladri
Arina

Comments or Responses

Login to post response