Regex101 working Regex bulder not

I created a regular expression in Regex101 and it works but when I try it in the regex builder it fails.

I am using python regular expession.

Can someone explain what you can do when it works in Regex101 but not in UiPath regex builder?

@David_Kaufman

Welcome to the community

Just to check did you hppen to select flavour as c# from left side menu?

If yes please show regex and how you are usign it

Cheers

As you can see Regex101 finds the text

This is my regular expression
(?<=etc.)[\r\n])(.+?)[\r\n][\r\n]
This is the text that I am extracting
“Final Out date,
etc.)
This is a test for a project to read this file and paste the values into Genesis

This signature is only required for credentialed medical personnel. Please see your local Medical”

I pasted the text and you can see that the text I am trying to extract is not highlighted.

Hey @David_Kaufman

Use below mentioned regex,

(?<=etc\.\))\s*(.*?)(?=\r?\n|$)

Regex 101 Screenshot:

Regex Builder Screenshot:

Regards,
Ajay Mishra

Ajay,

That is better. But it is returning multiple matches. I did not provide you with the complete text.

How would you alter the Regex to account for the return before the “etc.)”?

@David_Kaufman Can you provide me whole text if it is not confidential?

Or Else if the expected output is at first place then use 0 index to get first matching value.

Regards,
Ajay Mishra

Ajay,

It looks like it should work:

But when I run it there is no value returned

image

Hi @David_Kaufman

Try the below regex expression:

(?<=etc\.\)\s*)[\s\S]*?(?=\n)

Regards

I did try that it did not work.

Here is a bigger slice of the actual text. (see below)
The result I am seeking is “This is a test for a project to read this file and paste the values into Genesis”

The real test is to run it and see if you can get it to return a value to a field called Comments.

Thank you for you consideration.

  1. ARE YOU RESPONSIBLE FOR ORDERING SUPPLIES FOR YOUR DEPARTMENT? YES N O
  2. ARE YOU RESPONSIBLE FOR CREATING SCHEDULING TEMPLATES? YES NO
  3. ARE YOU A MANAGER? (e.g. Clinic Manager,
    Office Manager,
    etc.) YES NO
  4. WILL YOU BE RESPONSIBLE FOR INPATIENT UNIT SCHEDULING? YES NO
  5. COMMENTS: ( Add’l notes,
    modification details,
    TDY return dates,
    Final Out date,
    etc.)
    This is a test for a project to read this file and paste the values into Genesis

This signature is only required for credentialed medical personnel. Please see your local Medical Staff Manager for more info.

Hi @David_Kaufman

Try this:

(?<=COMMENTS[\s\S]*?\)\s*).*?(?=\n)

Regards