I want to hyphenate a token which is present in a database. My code:

String str = "The Appointments Committee Cabinet has approved the appointment of Dr. Harry Potter, Chief Economic Adviser,...