google sheet : extract number from string by matching the prefix

I have a cell contains this value/text :

T50 EX3 OF2 BE40 BL10 ZLD6 ZLS2 ZRS10 AA1

How to get the number with the ‘EX’ prefix ? in this case i want to extract that ‘3’ from EX3.

Also, this number can be any digit, for example it can be :

EX112

or

EX00078 

How to extract that ‘112’ and ‘00078’ and make it as number 112 and 78 ?

Thanks