Hi team I need to extract the data Chethan P from below paragraph
This is to certify that
Chethan P
has successfully completed the training module
Thanks
Chethan P
Hi team I need to extract the data Chethan P from below paragraph
This is to certify that
Chethan P
has successfully completed the training module
Thanks
Chethan P
Try Name = System.Text.RegularExpressions.Regex.Match(inputString, “(?<=that\n\n).*”)
Will this text always available in the first line?? and will there a line space after the first line always??
the text is the same as above only the name will change and enter will be there the same format but we have to extract the name only
This is to certify that
Name (Chethan P)
has successfully completed the training module
The only name that will change we can use look behind and look ahed
ya i use this code i get error object reference is not set to an instance of object
Write Line: Object reference not set to an instance of an object.
Thanks
Chethan P
@copy_writes - Please try this…
Just code : OpRex(0).value → This is equivalent to string. You dont need .tostring again…
Could you please share the code
I would to suggest to give it a try. If you face any error please let us know…
Ya i use this I get the error like this
When you give the hard code value on that time its working when you send the data through variable on that time its through error
@copy_writes - i guess, something is not printing from your pdf correctly/differently…Could you please try the below…
(?<=certify that\r?\n?\r?\n?).+
If this is not working…Write text pdf output to text file and share the text file please…
@copy_writes - Please see this…I haven’t changed anything in the code…just added your text file…
Why don’t you Assign a string variable to the expression I provided earlier… should not give any errors. Just use System.Text.RegularExpressions.Regex.Match(inputString, “(?<=that\n\n).*”) where inputString is your ReadPDF output and assign it to a variable of type String.
ya i got the op but if i give OpRex(0).value its not coming the op is null
if give OpRex(2).value the op is coming