Luca09
(Luca09)
1
Hello all,
i’m working on an activity to extract data from a PDF and insert it in an excel file.
I’m in the first step… i’m trying to read data with regex from a PDF and now i’m trying to write result in a log message…
for that i’m using
- “READ PDF Text” with pdf file name
- “Matches” and cofnigured regular expression
/(?<=TEXTEXAMPLE:\s)(.*?(?=\s))/g+
an put the result in “OutputResult” variable
- Write Line with:
(OutputResult.Value).ToString
But I get “Write Line: Object reference not set to an instance of an object”…
I don’t understand what is the issue…
Coud you help me please?
HI @Luca09
If you used Matches you need to use like
Expression(0) to get the first match
If you used match you use .Value or .ToString
Regards
Sudharsan
Anil_G
(Anil Gorthi)
3
@Luca09
As per the error either your matches activity is not giving any output or is not matching any data …
The error says that the variable you are trying to use is null or is not initialized…
Please check the same
Cheers
Luca09
(Luca09)
4
Thanks @Anil_G
there was an error in the REGEX expression… fixed and not i get the result
thanks!
1 Like
system
(system)
Closed
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.