Regex Identified value return null in UiPath

Hello,

I am trying to get the value from Text file using regex. In regex builder it is highlighting correctly but when I use the same pattern in UiPath it gives Null value.

Below pattern I am trying.

image

Output is -
image

Hi,

Can you try to use \r?\n instead of [\n]

Regards,

Yes, I have already tried with this. but no luck

Hi @nilesh.mahajan
I have made a Regex on Regex101 and tested the same in studio.
This perfectly fits your requirements.
INVOICE NO:\n[A-za-z]+\s+[0-9]+
NOTE : + for at least 1 character and * for at least 0 characters can be replaced.


Note: while working with regex builder websites you need to select the .NET/C# options, they are best suited for UiPath studio development.

if you don’t need the “Invoice number” keyword in your o/p then use below expression
(?<=INVOICE NO:\n)[A-za-z]+\s+[0-9]+

If this was helpful, like and leave a comment for more queries.

1 Like

Hi,

How about the following pattern?

"(?<=CONSOL\sINVOICE\sNO:\s+)\w*\s\w*/\w*"

Regards,

Hello Yoichi,

Can you please help me to get the value for Below highlighted column.
I have tried some patterns but not able to get that specific column value.

Below is the Text file data

Fizetési mód Teljesítve Szåmla kelte Fiz. hatåridÔ Oldal Szåmlaszåm
Átutalås 2022.09.07 2022.08.08 2022.09.07 1/ 1 ESZ0122100257

Hi,

How about the following pattern?

(?<=SzĂĄmlaszĂĄm\s+\S+\s+\d{4}\.\d{2}\.\d{2}\s+\d{4}\.\d{2}\.\d{2}\s+\d{4}\.\d{2}\.\d{2}\s+\d+/\s*\d+\s)\S+

Regards,

@nilesh.mahajan ,

Maybe an alternate Regex Expression could be the below :

(?<=SzĂĄmlaszĂĄm)\n.*\s(\w+)

However, we would need to access the First Group to get the value required.

Yes, it is working fine. thanks for the support.
Now I need to understand your logic how you achieved it. :smile:

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