There is a ControlLogix instruction called "STOD", which extracts a DINT from a String. There is a similar instruction called "STOR" which extracts a REAL number from a String.
If you ran STOD on that string, the result would be 500, because the STOD instruction ignores any non-numeric characters before it finds numeric characters, then stops when it encounters more non-numeric characters.
To extract both 500 and 34900 from the string, you would first have to split up the string based on character position, or using the FIND instruction to find the dash character.
Once you have those numeric values, the logic to compare them to a table or array should be easier.