I have a very simple sequence that:
Reads a pdf with OCR, outputs as ReadPDF string variable
A Matches activity with a regex formula of “(?<=Order Number\n\n)\d{5}” that outputs an |Enumerable variable WorkOrder
And an Assign activity to put the result into a variable idOrder = WorkOrder(0).ToString
The Regex works in the test environment:
I am getting an error: Assign : Object reference not set to an instance of an object.
I’ve used the matches activity successfully many times before and I’m not sure why this isn’t working.
Is there anything I’m using in Regex that isn’t allowed in UiPath’s use of Regex or something?
There are simply several regex versions with different syntax.
UiPath is based on .Net so i prefer to use .Net tools.
I generally like to use .NET Regex Tester - Regex Storm which is quite simple and has nothing fancy.
Regarding the newlines it can appear on different forms depending on the environment, dealing with Microsoft apps will often be \r\n or so.