Linked Questions

Popular Questions

I have the string like

Status:success  //expect in key value pair
Date:02/02/2019 //key=Date and value=02/02/2019
Remarks:category:xyz-info:shjjd jidjhe-DOB:21/07/1988.  

// key=Remarks and value =category:xyz-info:any info-DOB:21/07/1988, so here we will again split value like

Key=category and value=xyz
Key=info and value=any info

The above string splitting is working but sometimes Remarks field data is not coming in standard format,it can come like:

1) Remarks:Remarks: Remarks: Category:Abc Info:any info DOB:21/07/1988

2)Remarks: Category:abc-info:any-info which is-having data-DOB:21/07/1988

So like here delimiter is changing, so I could not find the pattern for this. Can someone please help me to resolve this issue. And I want to do this in java for Unix server. Your help would be appreciated.

Related Questions