Need to Extract the string between two strings where second string is different

Hi @avinashy

Adding onto @ashokkarale solution,

Can I assume that your second pdf data looks like this:

If so, the solution works.