My bot is scraping a PDF, using regex it is looking for anything between “(?<=ToEmail:).*(?=::CcEmail)” the result is ToEmail
So what I want to do is for each pdf read the PDF if condition (???) unclear as to how to write the if condition so that if it exists move the PDF to this file else move the pdf to this file.
Well sort of I read the PDF and in some of the PDFs there is an email address so I use regex to find that email, if it’s not there move to the else but I’m not sure how to write the condition?
I tried the above solution but it didn’t not give me the results I was looking for. In this screen you can see that I am getting the email address out of the PDF, what I need to do is use an if condition because I sometimes does not get anything out of the PDF example
Out of the matches I get this - ToEmail which I ready and display in using “Display Email Address” + ToEmail(0).Value
In my if condition I have this code - EmailString.ToUpper.Trim .Contains (“@”) which I know is probably wrong This is where I need the help writing the if condition based on what I am getting? thanks
I probably missed one part sometime this is the string that comes back Patient Satisfaction Scores
Abidi, bbbbb Y MD
ExportName: ::EmailSubject: ::ToEmail: ::CcEmail: ::FromEmail: :: Rate this Provider
Fiscal YTD
This is the data in the PDF someties is does not have an email address so I think that is why I get this error? Assign: Value cannot be null.
Parameter name: input
The output string is above - ExportName: ::EmailSubject: ::ToEmail: ::CcEmail: ::FromEmail: :: Rate this Provider or if an email is there it looks like this
ExportName: ::EmailSubject: ::ToEmail: Frank@me.org CcEmail: ::FromEmail: :: Rate this Provider