I want to split my text by <> characters.
Example suppose I have a string
string Name="this <link> is my <name>";
Now I want to split this so that I have a array of string like
ar[0]="this "
ar[1]="<link>"
ar[2]=" is my "
ar[3]="<name>"
I was trying with split function like
string[] ar=Name.Split('<');
I have also tried
string[] nameArray = Regex.Split(name, "<[^<]+>");
But this is not giving me
"<link>"
and "<name>"
But it is not a good approach.
Can I use regular expression here.