How to split text file's content based on blank lines?

Hi @surypratap.r

→ Store the input in a variable called Input.
→ Take for each activity to iterate the split text’s, give the below expression,

System.Text.RegularExpressions.Regex.Matches(Input,"([\s\S]*?[A-Za-z]+[\s\s]+)(?=\s+[A-Za-z]+)|((?<=\s+)([A-Za-z]+[\s\S]+))")

→ Inside for each insert the Write Text file activity to write the each split item to each file.
→ Give the name of the file and increase the count to change the name for each file.

Check the below workflow for better understanding,

Regex_Practice.xaml (14.6 KB)

It was working fine for me and check the workflow file and let me know.

Hope it helps!!

2 Likes