fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7.  
  8. string x="Symbol=COPE,Text=test 123,Time=12/5/2022 9:52:51 AM,Category=Market_Alerts,SubCategory=OrderValue,AlertMsgId-2212058000000001,Popup=False,Sound=False,IsUserSpecific=False,History=False,User=,Trader=,OrderId=,ObjType=ObjNone,Background=#FF000000,Foreground=#FFFFFFFF,IsItalic=False,IsBold=False";
  9. string[] ackSplit = x.Split(',');
  10. foreach(string ackPair in ackSplit) {
  11. string[] ackPairSplit = ackPair.Split(new char[]{'=','-'});
  12. try
  13. {
  14. Console.WriteLine(ackPairSplit[0] +" "+ ackPairSplit[1]);
  15. }
  16. catch (System.ArgumentException)
  17. {
  18. continue;
  19. }
  20. }
  21. }
  22. }
  23.  
Success #stdin #stdout 0.04s 24452KB
stdin
Standard input is empty
stdout
Symbol     COPE
Text     test 123
Time     12/5/2022 9:52:51 AM
Category     Market_Alerts
SubCategory     OrderValue
AlertMsgId     2212058000000001
Popup     False
Sound     False
IsUserSpecific     False
History     False
User     
Trader     
OrderId     
ObjType     ObjNone
Background     #FF000000
Foreground     #FFFFFFFF
IsItalic     False
IsBold     False