The solution would be like this for this specific problem:
Given:
46547 17395 25765 11325 14071 61688
You want two-digit numbers between 01 and 50, so break it up into chunks of two and eliminate any string that is not between 01 and 50.
So, the numbers from the string are:
46 54 71 73 95 25 76 51 13 25 14 07 16 16 88
Eliminated numbers:
54 71 73 95 25 76 51 88
Numbers remaining:
46 25 13 14 07 16
So, the 2 contestants from a game show out of a pool of 50 would be 46 and 25 (since these are the possible contestants based from the given).