I have two string like below..I want to split those string on space but ignore space if space found inside quotes....
LA L'TL0BPC,C'ABC ' THIS IS COMMENT
LA C'TL0PC',C'ABC ' THIS IS COMMENT
MVC EBW000(4),=C'MPI ' THIS IS ANOTHER' CASE
I want to split those lines like this
LA L'TL0BPC,C'ABC ' THIS IS COMMENT
LA C'TL0PC',C'ABC ' THIS IS COMMENT
How to achieve this using java regex....Any other solution is also acceptable..
I have tried this:
String ODD_QT_REGEX="[ ]+(?=([^'']*'[^'']*')*[^'']*)";
String EVEN_QT_REGEX="[ ]+(?=([^'']*'[^'']*')*[^'']*$)";
but this doesn't do what I need.