1|2|3|test james ke the one |value
1|2|3|test the value|comp
1|2|3|test james|value
1|2|3|one two three|value
I need split the 4th delimiter value into 3 fields based on below condition.if 4th field contains "ke loc" or "the" then i should not consider it is word and need to take following word also
otherwise take it is word and write in output file separated by |
Expected outfile :
1|2|3|test|james|ke the one |value
1|2|3|test|the value||comp
1|2|3|test|james|||value
1|2|3|one|two|three|value