Happy Halloween everyone

Is it possible to extract a text that has a pattern or format in a string?
For example I have to text boxes the first one shows the original text. When I click the button, it will only show the text that I want.

untitled.JPG

In the first box, the other texts that i don't want are random in length and are alphanumeric but the text that I want has a fixed length, fixed format/pattern and only numeric. And also, the whole string in the first text box does not have fixed length.

Thanks~