Extract and compare text

Since it is in a loop the 3 digit number doesnt stay the same so i cannot assign any value rather a variable. How do i extract this data from get text value?