Here is the input string
string1 = 0.9% SODIUM CHLORIDE 8290306544 FLUSH 0.9 % SYRINGE 10 ML
string2 = 0.9% SODIUM CHLORIDE 8290-3071-44 FLUSH 0.9 % SYRINGE 10 MM
string3 = 0.9% SODIUM CHLORIDE 290306544 FLUSH 0.9 % SYRINGE 10 cm
These are three string that I'm working on, so here I want two remove space from number followed by unit/dimension/mesurments and % as well, eg- 10 ML => 10ML but 8290306544FLUSH this is wrong. and second thing is if there is 10 digit number then make format like 4 digit - 4 digit - 2 digit. eg- 8290-3065-44 and if there is 9 digit the add zero at first and make it in format. eg- 290306544 => 0290306544 => 0290-3065-44
I want output like
string1 = 0.9% SODIUM CHLORIDE 8290-3065-44 FLUSH 0.9% SYRINGE 10ML
string2 = 0.9% SODIUM CHLORIDE 8290-3071-44 FLUSH 0.9% SYRINGE 76MM
string3 = 0.9% SODIUM CHLORIDE 0290-3065-44 FLUSH 0.9% SYRINGE 65cm
how I make python function for this