Hi, All!
I am new in UiPath and I started to work on Reg-Ex lately.
I have an invoice PDF and scraped some text from PDF with Screen Scraping.
Text is:
"2481 Felosa Drive
Llano, Texas
Pin Code 78643
+17319696651
TIN: 14122226789"
– When I want to scrap TIN number; I use this expression;
(?<=TIN:\s)(\d*?(?=\s))
Unfortunately tha macthes activity returns blank value, although I verified by opening the activity and test the expression.
I will add pictures. I do not know what is my fault. Can anyone help me please?
Thank you very much.
Yoichi
(Yoichi)
June 13, 2022, 2:31pm
2
Hi,
Can you try the following pattern?
(?<=TIN:\s)\d*
Regards,
2 Likes
OMG! It worked. But I want to grasp the logic of this. What was wrong with my expression?
Yoichi
(Yoichi)
June 13, 2022, 2:39pm
4
Hi,
What was wrong with my expression?
(?=\s)
means it matches characters which before whitespace (\s
). However, as there is no whitespace after number in your sample, it doesn’t match. So, I removed unnecessary pattern : (?=\s)
Hope this helps you.
Regards,
Thank for your help. I am newbie in UiPath
1 Like
system
(system)
Closed
June 18, 2022, 6:27am
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.