I have two text fields.
1) caption is ****** followed by 4 digits
2) caption is whole number with last four digits same as above.
I dynamically get the 4 digits from (1) and try to get the full number from (2) by searching for caption ***** followed by 4 digits above.
At this time I have two txt fields which match.
On my machine it matches the first txt field and in different machines, it matches the second txt field. so I always get xxxx follwed by 4 digits and in other machines they get full number. If I use  I get the full number but it fails for others. Is there any setting that I need to do on my silk or Internet explorer?
Not clear from your post, but do you want to ignore the first part of the whole number returned in the (2) caption and only match the last 4 digits on any given machine?
how is the first part of the whole number generated? Session based, log in based or random?
Is it a random number that you dont care about?
If you dont care about the first part of the whole number, you can use a wildcard * in your declaration tag and for the caption. If you know exactly how many characters are generated you can also substitute "?" for each of the numbers in the declaration tag for the caption.
Provide more info on the AUT and your code in case you need a better answer
I am sorry if I am not clear, I had tough time writing the explanation. the case is asfollows:
The number is generated through some internal process. the first text field just displays *s followed by last 4 digits for security reasons. There is an image next to it which we can click to see the whole number. Since the number is dynamic, we get the last four digits and then try to get the full number using caption *s followed by the last 4 digits got above. It now technically matches both the text fields.
I am confused...if the field type is TextField, why are you looking at the caption property?
If you are looking at caption, then it is probably a label, not a text field.
At any rate, I still do not understand the problem from your original post.
It would help if you posted your code with the relevant declarations from the .inc file, duly formatted using the UBB tags for formatting code [ code ] [ / code ].
I have intentionally included the spaces in the tags so that they dont get processed in my post.