Script to Extract a Number in a Given Line

Script to extract a number in a given line
I've a lines like below
UPLOAD_ABC_CH_1_20121212_1717_ABC_USER_12345.csv, want to extract number after ABC_USER, so here is "12345", sometimes line like below
UPLOAD_ABC_CH_20121212_1717_DEF_USER_982345.csv here is "982345"
sometimes line like below
UPLOAD_ABC_20121212_1717_GHI_USER_972145.csv here is "972145"

STRING="UPLOAD_ABC_CH_1_20121212_1717_ABC_USE R_12345.csv"
F1="${STRING%.*}" # extract UPLOAD_ABC_CH_1_20121212_1717_ABC_USER_12345
F2="${F1##*_}" # extract 12345
also, you can read a file by "read command" and extract numeric field as
you want
see also "man bash"