I just want to give you an example. The logs that I need to parse will not have a definite single separator like , or tab. But the my question had simple tab separated format. I would be parsing lines of this format : A=XX;Testing of YY;ZZ;Criticality:WW In the above line, I may need to extract XX, YY, ZZ and WW. So, by allowing regular expression, I would be able to achieve that with grouping.