0

I need help with a regex pattern in notepad++ I have this statement

'alpha_1003_ind_type'   '0':5649,
'alpha_1003_ind_type'   '1':16153,
'alpha_1003_ind_type'   NULL
'bravo_1003_ind_type'   '0':6374,
'bravo_1003_ind_type'   '1':11316,
'bravo_1003_ind_type'   NULL
'base_income'   '0':400800,
'charlie_dclrn_fclos_ind_type'  '0':204779,
'charlie_dclrn_fclos_ind_type'  '1':1574,
'charlie_dclrn_fclos_ind_type'  NULL
'delta_citizen_ind_type'    '0':18304,
'delta_citizen_ind_type'    '1':188703,
'delta_citizen_ind_type'NULL

the lines with nulls to be deleted, need the tabbed space between the first quotes and the second quotes to be deleted need the consecutive matches to be deleted. as well after the first match needs to have :{ and at the end of the removed matched need to have } The result needs to look like this below.

'alpha_1003_ind_type':{'0':5649,
'1':16153},
'bravo_1003_ind_type':{'0':6374,
'1':11316},
'base_income':{'0':400800},
'charlie_dclrn_fclos_ind_type':{'0':204779,
'1':1574},
'delta_citizen_ind_type':{'0':18304,
'1':188703},

Would someone be able to help with this problem? Thanks

Ann Zen
  • 17,892
  • 6
  • 20
  • 39
MATT NOEL
  • 1
  • 1
  • I'm not good at regex, but this is close to your input ____ find what: `^('.*?') (.*)\n.* (.*)\n.*` and replace with: `$1{$2\n$3}` only to bypass `base_income` line, I couldn't figure it out... – Haji Rahmatullah Mar 28 '21 at 12:01

0 Answers0