Regex help tutorial MEGAPOST – Making your first Regex post, Reusable Regex Patterns, Regex Troubleshooting, Sample Workflow and more

Great Job !! @Steven_McKeering

BR.

1 Like

Very helpful post. Keep posting @Steven_McKeering
Thank you.

1 Like

@Steven_McKeering : I need your help in Regex

I need to get next n lines along with Matching text

Sample Text

Invoice:
ABC
123
567
Some random data which I don’t want.

Expected output:
Invoice:
ABC
123
567

Please note the order of the text can be different as well as the data is not case sensitive.

Sample 2:

Metadat:
aaabb
dgffyf
qwet

Invoices:
123
456
abc

Expected output:

  1. Metadat:
    aaabb
    dgffyf
    qwet

  2. Invoices:
    123
    456
    abc

Welcome to the UiPath Community :partying_face: @Rohit_Kishor_Varadkar

Thanks for the SOP! :blush:

Please make a new/separate post and I promise :crossed_fingers: you will have a fast answer from me or another member of this great community!

1 Like

:+1:

1 Like

Great post! Helps a lot, liked and shared - thanks.

1 Like

Hi Steve,

Thats a wonderful Post quite useful a lot.

Here is my query.

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.

Hey @Karthikeyan_Lohanathan

Thanks for your post.

Do you mind creating a new post. I am sure you will have a response very fast :wink:

Yes Sure. Steve.

1 Like