How to split a string having "|","$","^" as delimeter using Regex in C#?

Rajnilari2015
Posted by Rajnilari2015 under C# category on | Points: 40 | Views : 371
using System;
using System.Linq;
using System.Text.RegularExpressions;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Regex
.Split("RNATeam|Rajlaxmi$Niladri^Arina", @"[|$^]+")
.ToList()
.ForEach(i => Console.WriteLine(i));
}
}
}


Output
--------


RNATeam
Rajlaxmi
Niladri
Arina

Comments or Responses

Login to post response