i have below combinations as as input, Please help me with a function to return output variable as discussed below
COMPANY-ID_ABC_123 ==> This should give three outputs (COMPANY-ID,ABC,123)
COMPANY-ID ==> this should give give three outputs such as (COMPANY-ID,null,null)
COMPANY-ID-FLAG ==> this should give give three outputs such as (COMPANY-ID,FLAG,null)
COMPANY-ID-FLAG-ES ==> this should give give three outputs such as (COMPANY-ID,FLAG,ES)
COMPANY-ID-ES ==> this should give give three outputs such as (COMPANY-ID,ES,null)
IOB-2003 ==> if i give any other string other than the above , it has to just display (IOB-2003,null,null)