UNIX-how to find out the numeric value

Hi All,

I need to found the below numeric value using unix(shell) commands in .txt file and its available in root directory.

for example: file name is siva.txt and content is

Siva_12345_werwerwe,11,22,33
Siva_12346_werwerwe,22,33,44
Siva_12347_werwerwe,55,44,66

for above string i need only 12345 , 12346 , 12347 numeric values only in before first comma(,).
Kindly help me

Thanks
Siva

Please use code tags as required by forum rules!

How or where are those strings stored? In a file? One or more shell variables?
What's your system (OS, shell)?

awk -F ',' '{gsub(/[^0-9]/, x, $1); print $1}' siva.txt