Hi
I am beginner to Perl. Needs a help on processing the log file.
Here is the content of file.
2015-03-27 20:39:49,796 ERROR MPesa 7002 webServices 10.201.12.200- [M +P27203801969209][301a8a0e-bb59-4182-9a4b-79abbb3ed39a][payBillRecharg +eAllOperator][McomSendSMSServiceImpl][callSpiceSMSApi] - Exit Method +with status Map : {smsFlag=true, errorMsgs=null, status=SUCCESS} for +msisdn : 9431641426 2015-03-27 20:39:49,796 ERROR MPesa 7002 webServices 10.201.12.200- [M +P27203801969209][301a8a0e-bb59-4182-9a4b-79abbb3ed39a][payBillRecharg +eAllOperator][SmsDataHelper][setSmsData] - Exiting method setSmsData +for Msisdn : 9431641426 with SMS Flg : true
In above file I need to check for the Pattern [MP27203801969209] and pick that value and the corresponding 9431641426 value in the end. Picking these value I need to put this combination in another file. Also value "[MP27203801969209]" is not hard coded so I have to check for this block [MP[1-9]] in each line.
Please suggest the perl code for the same.
In reply to Perl Regular Expression Issue by arpita
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |