way to extract variable from text

hello~~
sorry sorry , i need some help again .

i have Layer:0J6A4584_JPG_274__22_mm name object

a = 274
b = 22

i need to extract some text from object name

pls how can do that ?~~