I need to change several parts of a single String where the specified parts have some Characters in common; for example:
worker => working
work => worked
note :: "=>" means "changes to"
Using codes such as below put out plenty of bugs:
String txt = "work like a real worker";
String txt2 = txt.replace("worker", "working").replace("work", "worked");
As I tested the codes above, they output "worked like a real workeding", however I need to get "worked like a real working".