If there are no spaces between numbers then you can use following formula.
=TRIM(RIGHT(SUBSTITUTE(TRIM(LEFT(SUBSTITUTE(A3," yrs",REPT(" ",99)),99))," ",REPT(" ",99)),99))
2
solved Excel Formula to extract previous word (towards left) from a specific position