string - Replace {{rammdmd}} into %s in java -


how replace {{......}} %s in following sentence using java

string str="your appointment {{provider_name}} on {{start_time}} cancelled @ {{carecenter_name}}. call {{carecenter_phonenumber}} queries."; 

result should this

your appointment %s on %s cancelled @ %s. call %s queries."; 

use string.replaceall() or string.replacefirst()


Comments