XML to inContact Studio Multiline String
<?xml version =" 1.0" ?>
<note date =" 12/11/99" >
<to >Tove</to >
<from >Jani</from >
<heading >Reminder</heading >
<body >Don't forget me this weekend!</body >
</note >
datastring. append( $" <?xml version= \" 1.0 \" ?> { char ( 10 ) } " )
datastring. append( $" < note date= \" 12 / 11 / 99 \" > { char ( 10 ) } " )
datastring. append( $" <to>Tove</to> { char ( 10 ) } " )
datastring. append( $" <from>Jani</from> { char ( 10 ) } " )
datastring. append( $" <heading>Reminder</heading> { char ( 10 ) } " )
datastring. append( $" <body>Don't forget me this weekend!</body> { char ( 10 ) } " )
datastring. append( $" </note> { char ( 10 ) } " )
https://gchq.github.io/CyberChef/#recipe=Comment('Based%20on%20https://help.nice-incontact.com/content/studio/guide/datetimenumberformats.htm')Find_/_Replace(%7B'option':'Simple%20string','string':'%22'%7D,'%5C%5C%5C%5C%22',true,false,true,false)Find_/_Replace(%7B'option':'Simple%20string','string':'%5C''%7D,'%5C%5C%5C'',true,false,true,false)Find_/_Replace(%7B'option':'Simple%20string','string':'%7B'%7D,'%5C%5C%7B',true,false,true,false)Remove_whitespace(false,true,false,false,false,false)Pad_lines('Start',20,'datastring.append($%22')Pad_lines('End',12,'%7Bchar(10)%7D%22)')&input=PD94bWwgdmVyc2lvbj0iMS4wIj8%2BDQo8bm90ZSBkYXRlPSIxMi8xMS85OSI%2BDQo8dG8%2BVG92ZTwvdG8%2BDQo8ZnJvbT5KYW5pPC9mcm9tPg0KPGhlYWRpbmc%2BUmVtaW5kZXI8L2hlYWRpbmc%2BDQo8Ym9keT5Eb24ndCBmb3JnZXQgbWUgdGhpcyB3ZWVrZW5kITwvYm9keT4NCjwvbm90ZT4&ieol=CRLF
Comment('Based on https://help.nice-incontact.com/content/studio/guide/datetimenumberformats.htm')
Find_/_Replace({'option':'Simple string','string':'"'},'\\\\"',true,false,true,false)
Find_/_Replace({'option':'Simple string','string':'\''},'\\\'',true,false,true,false)
Find_/_Replace({'option':'Simple string','string':'{'},'\\{',true,false,true,false)
Remove_whitespace(false,true,false,false,false,false)
Pad_lines('Start',20,'datastring.append($"')
Pad_lines('End',12,'{char(10)}")')
[
{ "op" : " Comment" ,
"args" : [" Based on https://help.nice-incontact.com/content/studio/guide/datetimenumberformats.htm" ] },
{ "op" : " Find / Replace" ,
"args" : [{ "option" : " Simple string" , "string" : " \" " }, " \\\\\" " , true , false , true , false ] },
{ "op" : " Find / Replace" ,
"args" : [{ "option" : " Simple string" , "string" : " '" }, " \\ '" , true , false , true , false ] },
{ "op" : " Find / Replace" ,
"args" : [{ "option" : " Simple string" , "string" : " {" }, " \\ {" , true , false , true , false ] },
{ "op" : " Remove whitespace" ,
"args" : [false , true , false , false , false , false ] },
{ "op" : " Pad lines" ,
"args" : [" Start" , 20 , " datastring.append($\" " ] },
{ "op" : " Pad lines" ,
"args" : [" End" , 12 , " {char(10)}\" )" ] }
]