How to separate the string in a new line

I want to separate this string as below

For Example:

String Value : ABCFrom: October 17, 2000 DEFFrom: January 28, 2000* GHIFrom: July 12, 2023

Expected output:( I want the output in this way)
ABCFrom: October 17, 2000
DEFFrom: January 28, 2000*
GHIFrom: July 12, 2023

Please advise on how do I manipulate the string in such a way that I get the expected output as my outcome.

Thanks in advance for your time and assistance.

Hi,

How about the following expression?

System.Text.RegularExpressions.Regex.Replace(yourString,"(?<=:\s+[A-Za-z]+\s+\d+,\s+\d+[*]*)\s",vbCrLf)

Regards,

You can try this expression

System.Text.RegularExpressions.Regex.matches(“yourText”,“\w+From:[\s*]\w+[\s0-9,*]+”)

It will matches all and based one index you can cal it

Out put:-

Hi @8SEVEN

Check the below regular expression and used replace function to replace every sentence after space with new line.

- Assign -> Input = "ABCFrom: October 17, 2000 DEFFrom: January 28, 2000* GHIFrom: July 12, 2023"

- Assign -> Output = System.Text.RegularExpressions.Regex.Replace(Input.ToString,"(?<=\w+\:\s+\w+\s+\d+\,\s+\d+\**)\s+",vbcrlf)

Check the below workflow for better understanding

Hope it helps!!

you can use Regex Expressions to get a particular output which we want in Entire inputs…

Hi @8SEVEN

you can try this Xaml

Xaml :- separate the string in a new line.zip (1.7 KB)

output :-

image

Thank you everyone I was able to resolve the issue based on your above comments.

Thank you for your time and guidance :+1:t2:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.