And a bit of a monster for D

Formula: copy to clipboard
="ANA-"&TRIM(LOOKUP(99^99,--("0"&MID(A2,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A2&"0123456789")),ROW(1:10000)))))&"-"&TRIM(RIGHT(SUBSTITUTE(TRIM(LEFT(A2,FIND("|",SUBSTITUTE(A2," ","|",LEN(A2)-LEN(SUBSTITUTE(A2," ",""))))-1))," ",REPT(" ",LEN(TRIM(LEFT(A2,FIND("|",SUBSTITUTE(A2," ","|",LEN(A2)-LEN(SUBSTITUTE(A2," ",""))))-1))))),LEN(TRIM(LEFT(A2,FIND("|",SUBSTITUTE(A2," ","|",LEN(A2)-LEN(SUBSTITUTE(A2," ",""))))-1)))))