Regex Identified value return null in UiPath


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.


Output is -


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


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


How about the following pattern?



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


How about the following pattern?



@nilesh.mahajan ,

Maybe an alternate Regex Expression could be the below :


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.