Arrange a string
which contain slash(\) keyword in C#
public static void
arrangeString() {
string sep =
"abc yrr dfr yjr \"fdff fdfd dfdf\" sdf rtr
\"dsdfs sfdsf sdfdsf \" sdd";
var re = new
System.Text.RegularExpressions.Regex("(?<=\")[^\"]*(?=\")
| [^\" ]+"); var
strings =
re.Matches(sep).Cast<System.Text.RegularExpressions.Match>().Select(m
=> m.Value).ToArray();
foreach (var
item in strings) { Console.WriteLine(item); }
Console.ReadLine(); } |
Output
EmoticonEmoticon