Hi I cant seem to get the expression for the data I want below. Is there any way to find the expresssion.
(?<=Invoice INV0002\s\n\n).*(?=\sBILL TO)
Thankyou! But when i use this formula in the uipath, it does not work as it say that there is an error “the object reference is not an instance of an object.” and it does not type into my excel
Unfortunately, your screenshot doesn’t tell me what object isn’t set to a reference of an object. To get text using a regex, you can use the Match activity in UiPath, or you can directly assign the value to System.Text.RegularExpressions.Regex.Match(MainPdfTextVariable, row("Regex").ToString).Value
, where MainPdfTextVariable
contains the text you’re trying to filter, and row("Regex")
comes from your table.
the assign cannot work when i add the supplier name regex into the data table. When i do for the invoice number it works.
I don’t see where you’re using the Match activity from the Activities list. Match(0).Value
is invalid syntax. If you want to use assign, use the longer expression I posted, but with the relevant variables in place of the ones I used.
On the right side of the Assign activity in place of Match(0).Value
.
It works now thank you!
Here’s a simple way to do it, though it assumes the @ symbol will only appear when an email is in the output.
[^\s]+@[^\s]+
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.