How to use assign activity

Hi guys am attaching my workflow. i am trying to get data from pdf by read pdf with ocr activity after that am using assign activity to fetch a column from a pdf and assign that value to variable as am using substring to fetch the data from pdf am getting issue as i want only a policy number but its giving me all the value after policy.
Please help me how to get only a policy number in assign activity and am also attaching the output what am getting.


ThanxExtract_Data.xaml (20.6 KB)

You need to do something along the lines of this logic …

Substring(IndexOf("texttofind"+1, indexOf("2ndtexttofind" - IndexOf("texttofind").trim

You may need to play around with the numbers to get the perfect result.