Code:
$
$
$ echo $STR
Transaction_ID:SDP-DM-151204679 , Transaction_DateTime:2011-02-11 00:00:15 GMT+05:30 , Transaction_Mode:WAP , Circle_ID:4 , Circle_Name:BJ ,Zone: , CustomerID:B_31563486 , MSISDN:7870904329 , IMSI:405876122068099 , IMEI: , Sub_Profile:Pre-Paid , CPID:Nazara , CPNAME:Nazara , Content_ID:NA , Content_Name:Java%20Games , Base_Price:50.0 , Charge_Code:code50 , Content_Price:50 , Content_Status: , Content_Type:Games , Other_Info:] , Static_ID:BJ#25848082 , Original_Content_Owner_ID:Nazara , External_Correlation_Id:2011021023585279271 , Product_Name: , Sender_MSISDN:56363 , Subscription_Channel: , Subscription_Type: , Location:BJ , PPL_FLAG:TRUE , CustomCDRInterceptor - CDR Info[Optional_Field1: , Optional_Field2: ,
$
$
$ echo $STR | perl -F, -lane 's/^\s*[- \w\[]+:(.*?)\s*$/$1/ foreach @F; print join ",", @F'
SDP-DM-151204679,2011-02-11 00:00:15 GMT+05:30,WAP,4,BJ,,B_31563486,7870904329,405876122068099,,Pre-Paid,Nazara,Nazara,NA,Java%20Games,50.0,code50,50,,Games,],BJ#25848082,Nazara,2011021023585279271,,56363,,,BJ,TRUE,,
$
$