How to replace "current timestamp" from the list of string contains "{ts '2017-01-12 16:09:20'}", The ts value changed for each String.
Eg: //Need to replace the list of old time stamp values to current time stamp
private void replaceOldTimeStampToCurrentTimeStamp(){
List<String>sampleString = new ArrayList<String>();
sampleString.add("VALUES ('CODE','01234','DDC','DDC','',1,'01100',null,null,'Y','SD','PRODUCT','','','',2200,2603,{ts '2017-04-25 14:09:20'},'dba',{ts '2017-04-25 14:09:20'},'dba')");
sampleString.add("VALUES ('TYPE','NW','New','New','',1,'01100',null,null,'Y','PRODUCT',null,'','',2200,2604,{ts '2017-01-12 16:09:20'},'dba',{ts '2017-01-12 16:09:20'},'dba')");
}
desired output:
VALUES('TYPE','NW','New','New','',1,'01100',null,null,'Y','PRODUCT',null,'','',2200,2604,current timestamp,'dba',current timestamp,'dba')
VALUES('CODE','01234','DDC','DDC','',1,'01100',null,null,'Y','SD','PRODUCT','','','',2200,2603,current timestamp,'dba',current timestamp,'dba')