Fetch digits between the text

it looks like you are processing XML Data. If so, then please share with us the XML sample data and we can check for a solution approach aligned out on XML Data handling.