jeudi 25 juin 2015

Replacing Substring in Java

I have situation in Java where i am reading contents of file in String. It is something like this - String s =

  String S = "<name>source</name> <value>NB_System</value> </nameValue> <nameValue> <name>timestamp</name> <value>2015-6-25 22:39:41:455</value> </nameValue> <nameValue> <name>TTL</name> <value>0</value> </nameValue>"

I want to delete the timestamp from the string - timestamp</name> <value>2015-6-25 22:39:41:455</value>

Timestamp is creating issues in comparing results with master copy. Any suggestions how to get rid of timestamp here?

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire