Hi team, please help me the how to split below string value

Hi team,

How to split these words

my string value str=“Assessments\n52\nDue for Reassessment\n3\nIncomplete assessments\n25\nAssessment Past Due\n7\nPending manage services”

but i need output like these
Assessments
52 Due for Reassessment
3 In complete assessments
7 Pending manage services

@Mada_Sai_Krishna

Assign activity properties:
To: outputText
Value: String.Join(Environment.NewLine, str.Split({"\n"}, StringSplitOptions.RemoveEmptyEntries).Select(Function(x) If(x.Contains(" "), x.Replace(" ", """"), x)))

@rlgandu

can you send me in C# code

@Mada_Sai_Krishna

Assign activity properties:
To: outputText
Value: String.Join(Environment.NewLine,
                   str.Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries)
                      .Select(x => {
                          int index = x.IndexOf(' ');
                          return index != -1 ? $"{x.Substring(0, index)} {x.Substring(index + 1)}" : x;
                      }))


Hi @Mada_Sai_Krishna

Please check the code in the below zip file.
It is done in C#

BlankProcess2.zip (41.3 KB)

Hope it helps!!