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

Rajnilari2015
Posted by Rajnilari2015 under C# category on | Points: 40 | Views : 1003
using static System.Console;
using System.Linq;
using System;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{

"RNATeam|Rajlaxmi$Niladri^Arina"
.Split(new Char[] { '|', '$','^' }, StringSplitOptions.RemoveEmptyEntries)
.ToList()
.ForEach(i => WriteLine(i));
}
}
}


Output
--------


RNATeam
Rajlaxmi
Niladri
Arina

Comments or Responses

Login to post response