Separate Text Content Based On RegEx – Activities
Hi,
My Query is that I have a repeated content stored in my text file which i ahve to separate into multiple outputs based on the number of times the repeated content occurs in the text file. I need to know if RegEx could solve this.
Below are the details.
Raw Text
Short Description : Need a RegEx help
Name : UiPath Admirer
Issue : RegEx
Issue Type : Medium
Long Description : Is there a way to separate the content using RegEx
Short Description : Need a RegEx help 1
Name : UiPath Admirer
Issue : RegEx 1
Issue Type : Medium
Long Description : Is there a way to separate the content using RegEx 1
Short Description : Need a RegEx help 2
Name : UiPath Admirer
Issue : RegEx 2
Issue Type : Medium
Long Description : Is there a way to separate the content using RegEx 2
Short Description : Need a RegEx help 3
Name : UiPath Admirer
Issue : RegEx 3
Issue Type : Medium
Long Description : Is there a way to separate the content using RegEx 3
Output
Output 1. Short Description : Need a RegEx help
Name : UiPath Admirer
Issue : RegEx
Issue Type : Medium
Long Description : Is there a way to separate the content using RegEx
Output 2.Short Description : Need a RegEx help 1
Name : UiPath Admirer
Issue : RegEx 1
Issue Type : Medium
Long Description : Is there a way to separate the content using RegEx 1
Output 3.Short Description : Need a RegEx help 2
Name : UiPath Admirer
Issue : RegEx 2
Issue Type : Medium
Long Description : Is there a way to separate the content using RegEx 2
Output 4.Short Description : Need a RegEx help 3
Name : UiPath Admirer
Issue : RegEx 3
Issue Type : Medium
Long Description : Is there a way to separate the content using RegEx 3
Pattern
The Label Names are always constant and will appear always in the file. “Short Description” is the field which I need to use to separate the content into multiple outputs depending on the content. Sometimes the content will have only one short description, next time it will appear more than once, so dynamically I need to identify how many times the word “Short Description” appears and accordingly i need to separate the content into that many outputs. Please advise.
Read more here: Source link